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
regression in overriding methods with default arguments #5178
Comments
Imported From: https://issues.scala-lang.org/browse/SI-5178?orig=1 |
@paulp said: |
Commit Message Bot (anonymous) said: I should know better than to behave as if usable inferences can |
@lrytz said: |
@paulp said: |
@lrytz said: |
@paulp said: |
@lrytz said: this is a consequence of the fact that we allow overriding defaults without so the fix in 9f9932bd20 is left in place, a comment is added in 5d90d00108 trait A1 { def f(x: Int): Int }
trait A2 extends A1 { def f(x: Int = 1): Int }
trait B { self: A1 =>
def f(x: Int = 2): Int = x
}
object t {
new A1 with B // here, B.f$default$1 should not have an 'override' flag
new A2 with B // here, B.f$default$1 would need an 'override' flag
} |
This compiles under 2.9.1, but under trunk:
The text was updated successfully, but these errors were encountered: