26 Apr 22:39
Getters for constructor parameters
From: Sorin Miklós Zsejki <zsejki@...>
Subject: Getters for constructor parameters
Newsgroups: gmane.comp.lang.fortress.general
Date: 2008-04-26 20:42:35 GMT
Subject: Getters for constructor parameters
Newsgroups: gmane.comp.lang.fortress.general
Date: 2008-04-26 20:42:35 GMT
Right now for this:
trait T
getter m(): String
end
object O(m: String) extends {T}
end
I get this error: "Object O does not define method m()@... declared in
T" and I have to add this to O:
getter m(): String = m
(and it works, although I seriously doubted before writing it).
My question is whether, over the long term, it will work without
declaring the getter in O. I know that getters are not fully
implemented yet, but I don't know exactly how this will work.
RSS Feed