-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Fix #2051: allow override T with => T or ()T #2096
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
Conversation
What about the following test:
We are good if that one still gives the error
|
The case above is rejected by some other check, we still have the same error as before. I just added it as a neg test. |
OK, I think we are good then. @smarter since you are currently playing with override val's do you see a reason why we should not do this? |
Not that I can think of but this change still seems weird to me, what is special about constructor parameters here? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
otherwise LGTM
@@ -0,0 +1,2 @@ | |||
class A[T](val x:T) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it would be nice to add several fields to the body of the class that are overriden in a subclass.
It would also be nice to include tests with trait vals and trait constructors.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @DarkDimius , I just added tests in the latest commit.
@smarter the reason is that |
Fix #2051: allow override
T
with=> T
or()T
.I'm not sure if this is the right fix. Could you please advise @DarkDimius ?