-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Labels
good first issuePerfect for someone who wants to get started contributingPerfect for someone who wants to get started contributingitype:bug
Description
Minimized code
object Test {
inline def foo: String = scala.compiletime.error(s"")
def main(args: Array[String]): Unit = println(foo)
}
Output
Compiles but throws an exception at runtime:
Exception in thread "main" scala.NotImplementedError: an implementation is missing
at scala.Predef$.$qmark$qmark$qmark(Predef.scala:347)
at Test$.main(Test.scala:4)
at Test.main(Test.scala)
Expectation
In the original code println(foo)
shouldn't compile (and doesn't if you remove the s
from the definition of foo
). If using s
in the error
string isn't allowed, I'd expect the compiler to tell me that instead of throwing an exception at runtime.
Metadata
Metadata
Assignees
Labels
good first issuePerfect for someone who wants to get started contributingPerfect for someone who wants to get started contributingitype:bug