Aladdin - Scala Bugtracking
[#400] project: compiler priority: low category: bug
submitter assigned to status date submitted
Nikolay Martin fixed 2005-02-21 13:51:50.0
subject [contrib #54] Creating a String class in package java.lang
code
package java.lang;
class String {}
what happened
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 2
        at scala.tools.scalac.typechecker.Analyzer$class.validateParentClasses(Analyzer.scala:314)
        at scala.tools.scalac.typechecker.Analyzer$class.transformTemplate(Analyzer.scala:1924)
        at scala.tools.scalac.typechecker.Analyzer$$anon$21.apply(Analyzer.scala:2250)
        at scala.tools.scalac.typechecker.Analyzer$$anon$21.apply(Analyzer.scala:2180)
        at scala.runtime.ResultOrException.tryBlock(ResultOrException.java:34)
        at scala.runtime.ScalaRunTime$.Try(ScalaRunTime.scala:29)
        at scala.tools.scalac.typechecker.Analyzer$class.transform(Analyzer.scala:2179)
        at scalac.ast.Transformer.transform(Transformer.java:284)
        at scala.tools.scalac.typechecker.Analyzer$class.transform(Analyzer.scala:2154)
        at scala.tools.scalac.typechecker.Analyzer$$anon$21.apply(Analyzer.scala:2225)
        at scala.tools.scalac.typechecker.Analyzer$$anon$21.apply(Analyzer.scala:2180)
        at scala.runtime.ResultOrException.tryBlock(ResultOrException.java:34)
        at scala.runtime.ScalaRunTime$.Try(ScalaRunTime.scala:29)
        at scala.tools.scalac.typechecker.Analyzer$class.transform(Analyzer.scala:2179)
        at scalac.ast.Transformer.transform(Transformer.java:284)
        at scala.tools.scalac.typechecker.Analyzer$class.transform(Analyzer.scala:2154)
        at scala.tools.scalac.typechecker.Analyzer$$anon$21.apply(Analyzer.scala:2225)
        at scala.tools.scalac.typechecker.Analyzer$$anon$21.apply(Analyzer.scala:2180)
        at scala.runtime.ResultOrException.tryBlock(ResultOrException.java:34)
        at scala.runtime.ScalaRunTime$.Try(ScalaRunTime.scala:29)
        at scala.tools.scalac.typechecker.Analyzer$class.transform(Analyzer.scala:2179)
        at scala.tools.scalac.typechecker.Analyzer$class.transform(Analyzer.scala:2121)
        at scala.tools.scalac.typechecker.Analyzer$class.transformStatSeq(Analyzer.scala:1868)
        at scala.tools.scalac.typechecker.Analyzer$class.apply(Analyzer.scala:131)
        at scalac.ast.Transformer.apply(Transformer.java:64)
        at scala.tools.scalac.typechecker.Analyzer$class.apply(Analyzer.scala:67)
        at scala.tools.scalac.typechecker.AnalyzerPhase$class.apply(AnalyzerPhase.scala:69)
        at scalac.Global.compile(Global.java:393)
        at scalac.Global.compile(Global.java:363)
        at scala.tools.scalac.Main$.main1(Main.scala:45)
        at scala.tools.scalac.Main$.main(Main.scala:28)
        at scala.tools.scalac.Main.main(Main.scala:28)
what expected Silent compilation.
[back to overview]
Changes of this bug report
Nikolay  edited on  2005-02-21 13:59:09.0
As we agreed, I enter this bug contribution into the main bugtracking system. The problem is also exhibited if we define class java.lang.Object in Scala. Then there's a "error overriding method ..." message (no crash).
Nikolay  edited on  2006-08-16 11:36:25.0
Defining java.lang.String is now ok. Defining java.lang.Object crashes the compiler (issues "illegal cyclic reference involving class Object" first).
Martin  edited on  2006-10-30 16:47:53.0