Using typedefed types as covariant return types
Bruno Medeiros
brunodomedeiros+spam at com.gmail
Mon Feb 12 06:54:32 PST 2007
Rick Mann wrote:
> Bill Baxter Wrote:
>
>> What are you reading that makes you think CFStringRef is "derived" from
>> CFTypeRef?
>
> It seems to be implied by the "Implicit Conversions" section of <http://www.digitalmars.com/d/type.html>:
>
> "A typedef or enum can be implicitly converted to its base type, but going the other way requires an explicit conversion. "
Implicitly convertible doesn't mean a type is a subtype of another.
Altough in this case of typedef and enums I think they could be subtypes
of the base type.
--
Bruno Medeiros - MSc in CS/E student
http://www.prowiki.org/wiki4d/wiki.cgi?BrunoMedeiros#D
More information about the Digitalmars-d
mailing list