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
The following case causes an assertion failure in the latest 2.12 version.
Unlike #10003, version 2.11.8 won't crash for this case. It seems to be a recent regression.
$ scalac -version
Scala compiler version 2.12.0-20161028-204919-0666377--Copyright2002-2016, LAMP/EPFL and Lightbend, Inc.
$ scalac abc.scala
error: java.lang.AssertionError: assertion failed:
AdaptTypeError- foundType is Erroneous: <error>{defg:Unit}
whilecompiling: abc.scala
during phase: typer
library version: version 2.12.0-20161028-204919-0666377
compiler version: version 2.12.0-20161028-204919-0666377
reconstructed args:
last tree to typer: Select(New, <init>)
tree position: line 3 of abc.scala
tree tpe: ()<error>{defg:Unit}
symbol: constructor $anon
symbol definition: def<init>(): $anon (a MethodSymbol)
symbol package: <empty>
symbol owners: constructor $anon -><$anon: <error>>-> value <local Bar> ->classBar
call site: classBar in package<empty>==Source file context for tree position ==0classBar {
1deff (x : { defg }) {}
2 f (newFoo { defg })
3 }
at scala.tools.nsc.Global.assert(Global.scala:229)
at scala.tools.nsc.typechecker.ContextErrors$TyperContextErrors$TyperErrorGen$.AdaptTypeError(ContextErrors.scala:216)
at scala.tools.nsc.typechecker.Typers$Typer.adaptMismatchedSkolems$1(Typers.scala:1044)
at scala.tools.nsc.typechecker.Typers$Typer.lastTry$1(Typers.scala:1055)
at scala.tools.nsc.typechecker.Typers$Typer.adaptExprNotFunMode$1(Typers.scala:1110)
at scala.tools.nsc.typechecker.Typers$Typer.vanillaAdapt$1(Typers.scala:1156)
at scala.tools.nsc.typechecker.Typers$Typer.adapt(Typers.scala:1200)
at scala.tools.nsc.typechecker.Typers$Typer.runTyper$1(Typers.scala:5519)
at scala.tools.nsc.typechecker.Typers$Typer.typedInternal(Typers.scala:5535)
(...)
$ cat abc.scala
classBar {
deff (x : { defg }) {}
f (newFoo { defg })
}
The text was updated successfully, but these errors were encountered:
The following case causes an assertion failure in the latest 2.12 version.
Unlike #10003, version 2.11.8 won't crash for this case. It seems to be a recent regression.
The text was updated successfully, but these errors were encountered: