Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'silent=false' is not working at c.inferImplicitValue #7047

Closed
scabug opened this issue Jan 30, 2013 · 3 comments
Closed

'silent=false' is not working at c.inferImplicitValue #7047

scabug opened this issue Jan 30, 2013 · 3 comments

Comments

@scabug
Copy link

scabug commented Jan 30, 2013

It seems that c.inferImplicitValue is ignoring the silent property, because no exception is thrown when the implicit is not available:

scala> import language.experimental.macros
import language.experimental.macros

scala> import reflect.macros.Context
import reflect.macros.Context

scala> def fImpl(c: Context): c.Expr[Unit] = {
     | import c.mirror._
     | import c.universe._
     | 
     | if (c.inferImplicitValue(typeOf[Int], false) == EmptyTree)
     |   c.abort(c.enclosingPosition, "silent=false is not working") 
     | 
     | reify( () )
     | }
fImpl: (c: scala.reflect.macros.Context)c.Expr[Unit]

scala> def f = macro fImpl
f: Unit

scala> f
<console>:12: error: silent=false is not working
              f
              ^
@scabug
Copy link
Author

scabug commented Jan 30, 2013

Imported From: https://issues.scala-lang.org/browse/SI-7047?orig=1
Reporter: Jesús López González (jlg)
Affected Versions: 2.10.0

@scabug
Copy link
Author

scabug commented May 5, 2013

@xeno-by said:
scala/scala#2494

@scabug
Copy link
Author

scabug commented May 11, 2013

@xeno-by said:
Fixed in scala/scala@b4da864

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants