-
Notifications
You must be signed in to change notification settings - Fork 1.1k
inline val
for opaque type
alias for literal type 'must have a literal constant type'
#13851
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
Comments
inline val
for opaque type
inline val
for opaque type
alias for literal value 'must have a literal constant type'
inline val
for opaque type
alias for literal value 'must have a literal constant type'inline val
for opaque type
alias for literal type 'must have a literal constant type'
Actually For example in this test we will not be able to inline it and will fail with a more confusing error message. object Num {
opaque type One = 1
inline val One: One = 1
}
def test = Num.One
// ^^^^^^^
// getter One is declared as `inline`, but was not inlined
//
// Try increasing `-Xmax-inlines` above 32 |
nicolasstucki
added a commit
to dotty-staging/dotty
that referenced
this issue
Nov 1, 2021
This was referenced Nov 1, 2021
nicolasstucki
added a commit
to dotty-staging/dotty
that referenced
this issue
Nov 1, 2021
`inline val`s cannot contain opaque aliases as these cannot be inlined through their type due to their opaqueness. We can support `inline def` with opaque types. Fixes scala#13851 Fixes scala#13852
olsdavis
pushed a commit
to olsdavis/dotty
that referenced
this issue
Apr 4, 2022
`inline val`s cannot contain opaque aliases as these cannot be inlined through their type due to their opaqueness. We can support `inline def` with opaque types. Fixes scala#13851 Fixes scala#13852
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Compiler version
3.1.1-RC1
Minimized code
Output
Expectation
If it is possible to inline a value of literal type
Int.MaxValue
, it should be possible to inline an opaque alias of that.The text was updated successfully, but these errors were encountered: