http://d.puremagic.com/issues/show_bug.cgi?id=6639
Summary: Difference beetwen "foo" and "foo"c Product: D Version: D2 Platform: x86 OS/Version: Windows Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: zeljko....@gmail.com --- Comment #0 from zeljkog <zeljko....@gmail.com> 2011-09-10 14:37:57 CEST --- After thinking a bit more I have concluded its important consistency issue. So I reposted it as separate issue. import std.stdio; void f(S)(S str){ writeln(str); } alias f!(string) fc; alias f!(wstring) fc; void main(){ fc("foo"); // L11 //~ fc("foo"c); // works //~ auto s = "foo"; //~ fc(s); // works } //~ Compilation (dmd 2.055) breaks with message: //~ bug.d(11): Error: function alias bug.f called with argument types: //~ ((string)) //~ matches both: //~ bug.f!(string).f(string str) //~ and: //~ bug.f!(immutable(wchar)[]).f(immutable(wchar)[] str) Maybe lexer should annotate string literal without StringPostfix according source code format? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------