[Issue 3686] New: condExp type combining
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Jan 7 12:32:49 PST 2010
http://d.puremagic.com/issues/show_bug.cgi?id=3686
Summary: condExp type combining
Product: D
Version: 2.038
Platform: Other
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: ellery-newcomer at utulsa.edu
--- Comment #0 from Ellery Newcomer <ellery-newcomer at utulsa.edu> 2010-01-07 12:32:48 PST ---
import std.stdio;
string s(string t1, string t2){
return "writeln(\"" ~ t1 ~ " " ~ t2 ~ " \"~ typeof(true ? cast(" ~ t1 ~
") 1 : cast(" ~ t2 ~ ") 1).stringof);\n";
}
void main()
{
mixin(s("ifloat","double"));
}
result of above code doesn't make sense to me. if something like
auto a = true ? 1i : 1;
is allowed, it seems the result type should be complex; not imaginary, and not
real.
I'm also curious why combining a char with a wchar or some such results in a
uint
--
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