[Issue 5416] null should have a type of its own

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Oct 7 09:09:41 PDT 2011


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


Benjamin Thaut <code at benjamin-thaut.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |code at benjamin-thaut.de


--- Comment #1 from Benjamin Thaut <code at benjamin-thaut.de> 2011-10-07 09:08:52 PDT ---
Also if you pass null to a template it completely looses its implict conversion
abilites. See following example.

void foo(Object o){
}

void fooHelper(T)(T o){
  foo(o);
}

void main(string[] args){
  fooHelper(null); //can not implicitly convert void* to Object
}

This also stops std.conv.emplace to work correctly with constructors you want
to pass null to.

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