[Issue 2955] New: Compiler rejects chained <>=

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat May 9 07:33:00 PDT 2009


http://d.puremagic.com/issues/show_bug.cgi?id=2955

           Summary: Compiler rejects chained <>=
           Product: D
           Version: 1.041
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: lijat.me at gmail.com


The following code

void main(){
        double a,b,c;
        assert(a <>= b <>= c);
}

gets this response from the compiler

johang at klaffhorn:~$ dmd test.d 
test.d(4): found '<>=' when expecting ')'
test.d(4): found 'c' when expecting ';' following 'statement'
test.d(4): found ')' instead of statement
johang at klaffhorn:~$

if parenthesis are added the problem disappear.

If this is not valid code the a more helpful error message would be nice.


-- 



More information about the Digitalmars-d-bugs mailing list