|
[#1091] |
project: compiler |
priority: low |
category: missing feature |
|
submitter |
assigned to |
status |
date submitted |
|
Sean |
Martin |
fixed |
2007-05-07 13:45:20.0 |
subject |
protected[this] does not relax covariant restriction |
code |
abstract class DefaultBufferedIterator[+A] extends BufferedIterator[A] {
protected[this] var lookahead : List[A] = Nil
}
|
what happened |
protected[this] allowed, but does not relax covariant restriction.
|
what expected |
should work. this-qualified protected has many use cases (in this case, lookahead needs to be manipulated by sub-class implementations). protected[this] is probably safe/sound (because subsumption of this is not allowed!), although I don't know how to prove it. |
[back to overview] |