digitalmars.D.bugs - [Issue 2084] New: operator ?: does not compute the tightest type
- d-bugmail puremagic.com (25/25) May 08 2008 http://d.puremagic.com/issues/show_bug.cgi?id=2084
- d-bugmail puremagic.com (9/9) May 22 2008 http://d.puremagic.com/issues/show_bug.cgi?id=2084
http://d.puremagic.com/issues/show_bug.cgi?id=2084 Summary: operator ?: does not compute the tightest type Product: D Version: unspecified Platform: PC OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: bugzilla digitalmars.com ReportedBy: andrei metalanguage.com Consider: import std.stdio; class Base {} class D1 : Base {} class D2 : Base {} void main(string[] args) { auto b = args ? new D1 : new D2; } This program should compile and run, deducing Base as b's type. It fails to compile as written. Replacing "auto" with "Base" still doesn't help. --
May 08 2008
http://d.puremagic.com/issues/show_bug.cgi?id=2084 bugzilla digitalmars.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED Fixed dmd 1.030 and 2.014 --
May 22 2008