Aladdin - Scala Bugtracking
[#292] project: interpreter priority: medium category: bug
submitter assigned to status date submitted
Nikolay Philippe fixed 2004-02-02 19:07:20.0
subject [contrib #16] Empty class definition crashes the interpreter
code
> class A
class A extends java.lang.Object with scala.ScalaObject
> class B extends A
Exception in thread "main" java.lang.IndexOutOfBoundsException: Index: 0, Size
0
        at java.util.ArrayList.RangeCheck(ArrayList.java:508)
        at java.util.ArrayList.get(ArrayList.java:320)
        at scalac.transformer.AddConstructors.transform(AddConstructors.java:2
)
        at scalac.transformer.AddConstructors.transform(AddConstructors.java:1
)
        at scalac.ast.GenTransformer.transform(Transformer.java:569)
        at scalac.transformer.AddConstructors.transform(AddConstructors.java:2
)
        at scalac.transformer.AddConstructors.transform(AddConstructors.java:1
)
        at scalac.ast.GenTransformer.transform(Transformer.java:569)
        at scalac.ast.GenTransformer.apply(Transformer.java:402)
        at scalac.transformer.AddConstructorsPhase.apply(AddConstructorsPhase.
va:60)
        at scalac.Global.compile(Global.java:306)
        at scalac.Global.compile(Global.java:292)
        at scala.tools.scalai.Interpreter.interpret(Interpreter.java:68)
        at scala.tools.scalai.InterpreterShell.eval(InterpreterShell.java:243)
        at scala.tools.scalai.InterpreterShell.handle(InterpreterShell.java:11

        at scala.tools.scalai.InterpreterShell.loop(InterpreterShell.java:105)
        at scala.tools.scalai.InterpreterShell.main(InterpreterShell.java:98)
        at scala.tools.scalai.Main.main(Main.java:34)
H:\_Th\scala>
what happened
scalaint crashed and exit
what expected The definition should be accepted.
[back to overview]
Changes of this bug report
Nikolay  edited on  2004-02-02 19:08:58.0
The problem is in only with the interpreter. The compiler accepts it.
Philippe  edited on  2004-03-24 12:52:23.0
Magically solved by some unknown change.