|
[#908] |
project: compiler |
priority: high |
category: bug |
|
submitter |
assigned to |
status |
date submitted |
|
Iulian |
Martin |
fixed |
2007-01-22 10:39:47.0 |
subject |
no error calling virtual methods from constructor, when viewable-bounds exist |
code |
abstract class A[T <% Ordered[T]] {
def makeA = new Object
// case object default extends Object
}
class C[T <% Ordered[T]](foo: Object) extends A[T] {
def this() = {
this(makeA)
// this(default)
}
}
|
what happened |
No error.
|
what expected |
'makeA' should not be visible inside constructor definitions before the default constructor is called. Not doing so results in virtual method calls on an un-initialized object instance, which results in VerifyErrors. Note that this bug is not yet released (only the svn compiler exhibits this behavior).
It seems to have something to do with viewable bounds (removing them gets the expected error). |
[back to overview] |