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
scala> noop(List(1) match { case Nil => 0; case (x::xs) => x })
error: exception during macro expansion:
scala.reflect.macros.TypecheckException: not found: value _
at scala.reflect.macros.runtime.Typers$$anonfun$typeCheck$2.apply(Typers.scala:31)
at scala.reflect.macros.runtime.Typers$$anonfun$typeCheck$2.apply(Typers.scala:25)
at scala.tools.nsc.typechecker.Contexts$Context.withMacrosEnabled(Contexts.scala:240)
at scala.reflect.macros.runtime.Typers$$anonfun$3.apply(Typers.scala:18)
at scala.reflect.macros.runtime.Typers$$anonfun$3.apply(Typers.scala:18)
at scala.reflect.macros.runtime.Typers$$anonfun$wrapper$1$1.apply(Typers.scala:19)
at scala.reflect.macros.runtime.Typers$$anonfun$wrapper$1$1.apply(Typers.scala:19)
at scala.tools.nsc.typechecker.Contexts$Context.withImplicitsEnabled(Contexts.scala:209)
at scala.reflect.macros.runtime.Typers$$anonfun$1.apply(Typers.scala:17)
at scala.reflect.macros.runtime.Typers$$anonfun$1.apply(Typers.scala:17)
at scala.reflect.macros.runtime.Typers$class.wrapper$1(Typers.scala:19)
at scala.reflect.macros.runtime.Typers$class.typeCheck(Typers.scala:25)
at scala.reflect.macros.runtime.Context.typeCheck(Context.scala:6)
at scala.reflect.macros.runtime.Context.typeCheck(Context.scala:6)
at monadsyntax.package$.noopImpl(package.scala:12)
It looks like possibly related to #5464, but seems distinct in that it is a regression.
The text was updated successfully, but these errors were encountered:
The function is treated as a stable application, and the application is typed in expression mode, rather than pattern mode. Under this mode, the ident _ does not typecheck.
I'm not sure yet what changed from 2.10.0 to 2.10.1 to lead us down this path.
This is a regression; it works fine in 2.10.0 but is broken in 2.10.1.
Given this macro definition which does nothing but resetLocalAttrs and then typeCheck the result:
If you try to use it you'll get an error:
It looks like possibly related to #5464, but seems distinct in that it is a regression.
The text was updated successfully, but these errors were encountered: