May 09, 2008 [Issue 2084] New: operator ?: does not compute the tightest type | ||||
---|---|---|---|---|
| ||||
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: #!/home/andrei/bin/rdmd -w 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 22, 2008 [Issue 2084] operator ?: does not compute the tightest type | ||||
---|---|---|---|---|
| ||||
Posted in reply to d-bugmail | http://d.puremagic.com/issues/show_bug.cgi?id=2084 bugzilla@digitalmars.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED ------- Comment #1 from bugzilla@digitalmars.com 2008-05-22 05:05 ------- Fixed dmd 1.030 and 2.014 -- |
Copyright © 1999-2021 by the D Language Foundation