You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Welcome to Scala version 2.8.0.r22407-b20100628154216 (JavaHotSpot(TM) ServerVM, Java1.5.0_22).
Type in expressions to have them evaluated.
Type:help for more information.
scala>defv=new ({ defa=0 })
<console>:5:error: classtype required but AnyRef{defa:<?>} found
defv=new ({ defa=0 })
^
Exception in thread "main" scala.tools.nsc.symtab.Types$$TypeError: only declarations allowed here
at scala.tools.nsc.typechecker.Contexts$$Context.error(Contexts.scala:273)
at scala.tools.nsc.typechecker.Infer$$Inferencer.error(Infer.scala:213)
at scala.tools.nsc.typechecker.Infer$$Inferencer.errorTree(Infer.scala:217)
at scala.tools.nsc.typechecker.Typers$$Typer.typedStat$$1(Typers.scala:2050)
at scala.tools.nsc.typechecker.Typers$$Typer$$$$anonfun$$20.apply(Typers.scala:2135)
at scala.tools.nsc.typechecker.Typers$$Typer$$$$anonfun$$20.apply(Typers.scala:2135)
at scala.collection.immutable.List.loop$$1(List.scala:115)
at scala.collection.immutable.List.mapConserve(List.scala:132)
at scala.tools.nsc.typechecker.Typers$$Typer.typedStats(Typers.scala:2135)
at scala.tools.nsc.typechecker.Typers$$Typer$$$$anonfun$$typedRefinement$$1.apply$$mcV$$sp(Typers.scala:2030)
at scala.tools.nsc.typechecker.Analyzer$$typerFactory$$$$anon$$3$$$$anonfun$$apply$$1.apply(Analyzer.scala:87)
at scala.tools.nsc.typechecker.Analyzer$$typerFactory$$$$anon$$3$$$$anonfun$$apply$$1.apply(Analyzer.scala:87)
at scala.collection.LinearSeqOptimized$$class.foreach(LinearSeqOptimized.scala:61)
at scala.collection.immutable.List.foreach(List.scala:45)
at scala.collection.generic.TraversableForwarder$$class.foreach(TraversableForwarder.scala:44)
at scala.collection.mutable.ListBuffer.foreach(ListBuffer.scala:42)
at scala.tools.nsc.typechecker.Analyzer$$typerFactory$$$$anon$$3.apply(Analyzer.scala:87)
at scala.tools.nsc.Global$$GlobalPhase$$$$anonfun$$applyPhase$$1.apply$$mcV$$sp(Global.scala:278)
at scala.tools.nsc.Global$$GlobalPhase$$$$anonfun$$applyPhase$$1.apply(Global.scala:278)
at scala.tools.nsc.Global$$GlobalPhase$$$$anonfun$$applyPhase$$1.apply(Global.scala:278)
at scala.tools.nsc.reporters.Reporter.withSource(Reporter.scala:48)
at scala.tools.nsc.Global$$GlobalPhase.applyPhase(Global.scala:278)
at scala.tools.nsc.typechecker.Analyzer$$typerFactory$$$$anon$$3$$$$anonfun$$run$$1.apply(Analyzer.scala:80)
at scala.tools.nsc.typechecker.Analyzer$$typerFactory$$$$anon$$3$$$$anonfun$$run$$1.apply(Analyzer.scala:80)
at scala.collection.Iterator$$class.foreach(Iterator.scala:631)
at scala.collection.mutable.ListBuffer$$$$anon$$1.foreach(ListBuffer.scala:304)
at scala.tools.nsc.typechecker.Analyzer$$typerFactory$$$$anon$$3.run(Analyzer.scala:80)
at scala.tools.nsc.Global$$Run.compileSources(Global.scala:735)
The text was updated successfully, but these errors were encountered:
@odersky said:
(In r23285) Closes #3614. Closes #3856. Refined handling of imports to avoid trees with null types in presentation compiler. Review by moors
The following line leads to to a compiler crash:
results in:
The text was updated successfully, but these errors were encountered: