(this might just be a question of wording - but perhaps it is a deep design question).
Is this legal?
trait partOne {
class one {
var x is public := 3
}
}
The spec says "a trait object is created by an object constructor that contains no field declarations and no executable code". Does this mean directly contains no field declarations at the top level, or transitively contains no field declarations inside it?
Similarly I guess "executable code" means no initialisation code at the top level - but...?
(this might just be a question of wording - but perhaps it is a deep design question).
Is this legal?
The spec says "a trait object is created by an object constructor that contains no field declarations and no executable code". Does this mean directly contains no field declarations at the top level, or transitively contains no field declarations inside it?
Similarly I guess "executable code" means no initialisation code at the top level - but...?