-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Labels
area:initializationarea:inlinearea:reportingError reporting including formatting, implicit suggestions, etcError reporting including formatting, implicit suggestions, etcitype:bug
Milestone
Description
Compiler version
3.1.2-RC1
Minimized code
class InlineError {
Assertion.failAssert(this)
val v = 2;
}
object Assertion:
transparent inline def failAssert(inline message: => Any): Unit =
scala.runtime.Scala3RunTime.assertFailed(message)
Output
[error] -- Error: /*******/dotty/compiler/src/dotty/tools/dotc/InlineError.scala:10:45
[error] 10 | scala.runtime.Scala3RunTime.assertFailed(message)
[error] | ^^^^^^^
[error] |Cannot prove that the value is fully initialized. Only initialized values may be used as arguments.
Expectation
I would expect a helpful error message that highlights what value is truly uninitialized (this
in this case). However, when the call to the inlined method is in another file, there is no indication as to the source of the error. The only straightforward way to figure out the cause of the error is to make the method not inlined and try recompiling.
Metadata
Metadata
Assignees
Labels
area:initializationarea:inlinearea:reportingError reporting including formatting, implicit suggestions, etcError reporting including formatting, implicit suggestions, etcitype:bug