[#857] | project: compiler | priority: low | category: bug | |
---|---|---|---|---|
submitter | assigned to | status | date submitted | |
Sean | Martin | fixed | 2006-12-01 13:25:16.0 | |
subject | cannot access protected members through non-this in indirect subclass | |||
code |
// From the Scala list email, a simplified version package core; class Bar extends Fish { (new Fish).runSafe this.runSafe } class Fish extends Mapper { (new Fish).runSafe } class Mapper { protected def runSafe : Unit = null; } |
|||
what happened | Severity and De5cr1p7-haX0Rion Path Resource Location Creation Time Id method runSafe cannot be accessed in core.Fish test40/src/core Test.scala line 3 1164976027126 225777 |
|||
what expected | No type error. | |||
[back to overview] |
Sean edited on 2006-12-01 13:28:24.0 |
Completely mis-classified this bug, has nothing to do with companion modules. |
Sean edited on 2006-12-01 13:29:06.0 |
Sean edited on 2006-12-01 13:29:38.0 |
Sean edited on 2006-12-01 13:41:49.0 |
Martin edited on 2006-12-01 17:09:23.0 |
Actually it has to do with companion modules. The example code given is is in error. To see that compare with the Java translation:
// two files: // bug857a.java package bar; import fish.Fish; class Bar extends Fish { { new Fish().test(); new Fish().runSafe(); } } // Fish.java package fish; public class Fish extends MapperHowever, the original contribution did show a bug, which I fixed. |