Summary: Forward implicit bool conversions to alias this
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: rejects-valid
          Severity: normal
          Priority: P2
         Component: DMD

--- Comment #0 from Shin Fujishiro <> 2010-10-08 12:14:52 PDT 
Alias this isn't implemented for implicit conversions to bool in conditional
expressions.  The following presumably valid code doesn't compile:
void main()
    S s;
    if (!s) {}  // (4)
struct S
    bool cond;
    alias cond this;
% dmd -o- -c test.d
test.d(4): Error: expression s of type S does not have a boolean value

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to