Skip to content

Fix #1263: Suppress super initializer call for val parameters of traits. #1410

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

Merged
merged 2 commits into from
Jul 28, 2016

Conversation

odersky
Copy link
Contributor

@odersky odersky commented Jul 22, 2016

Val-parameters of traits don't have an initializer, as other vals do. So
we cannot call the initializer in an initialization sequence of a subclass.

Fixes #1263. Review by @DarkDimius

… traits.

Val-parameters of traits don't have an initializer, as other vals do. So
we cannot call the initializer in an initialization sequence of a subclass.

Fixes scala#1263.
// transformFollowing call is needed to make memoize & lazy vals run
transformFollowing(DefDef(implementation(getter.asTerm), rhs))
}
else if (isScala2x) EmptyTree
else if (isScala2x || was(getter, ParamAccessor)) EmptyTree
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's the only semantic change on this line. The rest are just refactorings.

@DarkDimius
Copy link
Contributor

LGTM

@DarkDimius DarkDimius merged commit fe36073 into scala:master Jul 28, 2016
@allanrenucci allanrenucci deleted the fix-#1263 branch December 14, 2017 16:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants