Summary: Difference beetwen "foo" and "foo"c
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD

--- Comment #0 from zeljkog <> 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){

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:
------- You are receiving this mail because: -------

Reply via email to