Thread overview | |||||
---|---|---|---|---|---|
|
August 22, 2013 [Issue 10871] New: Typedef doesn't work with is null | ||||
---|---|---|---|---|
| ||||
http://d.puremagic.com/issues/show_bug.cgi?id=10871 Summary: Typedef doesn't work with is null Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: Phobos AssignedTo: nobody@puremagic.com ReportedBy: john.loughran.colvin@gmail.com --- Comment #0 from John Colvin <john.loughran.colvin@gmail.com> 2013-08-22 23:05:22 BST --- import std.typecons; alias Typedef!(void*) VP; void main() { VP vp; assert(vp is null); //won't compile } Error: incompatible types for ((vp) is (null)): 'Typedef!(void*, null)' and 'typeof(null)' -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
August 22, 2013 [Issue 10871] Typedef doesn't work with is null | ||||
---|---|---|---|---|
| ||||
Posted in reply to John Colvin | http://d.puremagic.com/issues/show_bug.cgi?id=10871 Andrej Mitrovic <andrej.mitrovich@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |andrej.mitrovich@gmail.com --- Comment #1 from Andrej Mitrovic <andrej.mitrovich@gmail.com> 2013-08-22 15:09:02 PDT --- I'm not sure how we could implement this, we don't have an "opIs" operator. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
August 22, 2013 [Issue 10871] Typedef doesn't work with is null | ||||
---|---|---|---|---|
| ||||
Posted in reply to John Colvin | http://d.puremagic.com/issues/show_bug.cgi?id=10871 --- Comment #2 from John Colvin <john.loughran.colvin@gmail.com> 2013-08-22 23:17:08 BST --- (In reply to comment #1) > I'm not sure how we could implement this, we don't have an "opIs" operator. yeah I have no idea either. Is there any other way of getting something like a type-safe alias? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
Copyright © 1999-2021 by the D Language Foundation