On 4/14/16 4:54 PM, Lucien wrote:
You're right.
In fact it didn't work because I did:
class A
{
@property foo() { return false; }
void myFunc() { }
}
class B : A
{
override @property foo() { return true; } // error
override void myFunc() { }
}
On Thursday, 14 April 2016 at 20:39:50 UTC, Steven Schveighoffer
wrote:
On 4/14/16 4:21 PM, Lucien wrote:
How can I override a property ?
Test code:
class A
{
@property bool foo { return false; }
This isn't valid, you need parentheses for foo. This doesn't
c
On Thursday, 14 April 2016 at 20:21:38 UTC, Lucien wrote:
How can I override a property ?
Test code:
class A
{
@property bool foo { return false; }
void myFunc() { ... }
}
class B : A
{
override bool foo { return true; } // error
override void myFunc
On 4/14/16 4:21 PM, Lucien wrote:
How can I override a property ?
Test code:
class A
{
@property bool foo { return false; }
This isn't valid, you need parentheses for foo. This doesn't compile
does it?
void myFunc() { ... }
}
class B : A
{
overr
How can I override a property ?
Test code:
class A
{
@property bool foo { return false; }
void myFunc() { ... }
}
class B : A
{
override bool foo { return true; } // error
override void myFunc() { ... }
}
Output error:
fun