-
Notifications
You must be signed in to change notification settings - Fork 1.1k
inline val class parameter in backend #3900
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
I don't think this should compile at all. |
I assume that |
Should |
I think not. It is not allowed either. WDYT? |
They should not. There is no way to inline the value of |
Should |
Yes, unless the secondary constructor is inlinable. Can it? |
I don't see why a secondary constructor could not be inlined, although I imagine it is not the same mechanism as inlining a normal function call: class Foo() {
def this(x: Int) = this()
}
new Foo(1) // inlined to new Foo() ? |
I don't think we should support inlining secondary constructors. It's going to be complicated to implement and offers no value. |
Fix #3900: add check for inline class parameters
emits the following error
The text was updated successfully, but these errors were encountered: