[Issue 8221] typeof(null) rejected as return type for covariant overrides

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Jun 14 00:37:35 PDT 2012


http://d.puremagic.com/issues/show_bug.cgi?id=8221



--- Comment #4 from Walter Bright <bugzilla at digitalmars.com> 2012-06-14 00:39:47 PDT ---
(In reply to comment #3)
> typeof(null) is a subtype of array/class/pointer types. By return type
> covariance rule, B.foo should be able to override A.foo.

Since A is not a base class of null, I do not think this is valid. foo could
return B, and that will work, because A is a base class of B.

-- 
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