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
Behavior: At phase inlinining, the following error message;
-- [E007] Type Mismatch Error: opaque-inline.scala:14:28 -----------------------
14 | val nine = Positive.apply(x)
| ^
| Found: (x : Int)
| Required: refined.Positive
longer explanation available when compiling with `-explain`
The error message makes no sense here. It came from the inlined expansion of f(value) which no longer typechecks
since the code is now outside of the region where the opaque alias was defined.
Expected Either an error on the definition of apply:
-- Error: opaque-inline.scala:8:15 ---------------------------------------------
8 | inline def apply(value: Int): Positive = f(value)
| ^
|Implementation restriction: No inline methods allowed where opaque type aliases are in scope
Or, if we can lift the implementation restriction, successful compilation with -Ycheck:all passing.
The text was updated successfully, but these errors were encountered:
odersky
added a commit
to dotty-staging/dotty
that referenced
this issue
Jun 13, 2021
The following code is adapted from a contributors comment
Behavior: At phase inlinining, the following error message;
The error message makes no sense here. It came from the inlined expansion of
f(value)
which no longer typecheckssince the code is now outside of the region where the opaque alias was defined.
Expected Either an error on the definition of
apply
:Or, if we can lift the implementation restriction, successful compilation with -Ycheck:all passing.
The text was updated successfully, but these errors were encountered: