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
inlinevalmsg="cba".reverse
traitE[T]
deff(using@annotation.implicitNotFound(msg) e: E[Int]):Unit= ()
@main defhello():Unit= f
Output
[error] -- [E172] TypeError:Main.scala:5:27
[error] 5|@main defhello():Unit= f
[error] |^
[error] |Nogiveninstance of typeE[Int] was found for parameter e of method f
Expectation
What happened here is that the complex expression "cba".reverse was assigned to an inline constant which was then used inside an annotation, disabling it. What should happens is one of two things. Either print an error that Scala does not support non-trivial inline expressions used inside annotations, or, it should work: