[Issue 6058] Contract inheritance causes compiler error
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Nov 19 03:39:08 PST 2012
http://d.puremagic.com/issues/show_bug.cgi?id=6058
Don <clugdbug at yahoo.com.au> changed:
What |Removed |Added
----------------------------------------------------------------------------
Version|D1 |D1 & D2
--- Comment #1 from Don <clugdbug at yahoo.com.au> 2012-11-19 03:39:07 PST ---
Applies equally to D2, if you add the 'override' keyword:
class Dummy {};
class Super
{
public Object test ()
out (obj) { }
body
{
return new Dummy;
}
}
class Example : Super
{
public override Dummy test ( )
{
return cast(Dummy) super.test;
}
}
void main ( )
{ }
-- D2 --
bug.d(16): Error: cast(const(Object))__result is not an lvalue
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list