Skip to content
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

Method call in subclass ruins "protected[this]-ness" #465

Closed
scabug opened this issue Feb 10, 2008 · 4 comments
Closed

Method call in subclass ruins "protected[this]-ness" #465

scabug opened this issue Feb 10, 2008 · 4 comments
Assignees

Comments

@scabug
Copy link

scabug commented Feb 10, 2008

class A[+T] {
  protected[this] def f(t: T) { }
}
class B extends A[Any] {
  f()
}

Doesn't work if compiled together: covariant type T occurs in contravariant position in type T of value t. Works if call to f in B is omitted.

@scabug
Copy link
Author

scabug commented Feb 10, 2008

Imported From: https://issues.scala-lang.org/browse/SI-465?orig=1
Reporter: @ingoem

@scabug
Copy link
Author

scabug commented Oct 9, 2008

@paulp said:
This appears to have been fixed - the sample compiles without complaint.

@scabug
Copy link
Author

scabug commented Oct 14, 2008

Mohsen Lesani [X] (lesani) said:
It works with 2.7.2.

@scabug
Copy link
Author

scabug commented Jan 14, 2009

@odersky said:
Milestone next_bugfix deleted

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

No branches or pull requests

2 participants