Error: cannot implicitly convert expression ("abcde") of type	invariant char[5u] to char[]
    BCS 
    ao at pathlink.com
       
    Wed Sep  5 07:59:56 PDT 2007
    
    
  
Reply to Tom,
> I just downloaded version 2.003 or DMD and tried to compile the
> following :-
> 
> class stringtest
> {
> void st1()
> {
> char[] s1 = "abcde";
> }
> }
> This fails with the error :-
> 
> Error: cannot implicitly convert expression ("abcde") of type
> invariant char[5u] to char[]
> 
> Is this a bug or am I doing something stupid.  This code compiled
> successfully on previous versions of the compiler.  Any help would be
> appreciated
> 
char[] s1 = "abcde"[];
this should work.
(No comment on the issue)
    
    
More information about the Digitalmars-d-learn
mailing list