Summary: Spurious error message with templates and alias this
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: minor
          Priority: P2
         Component: DMD

--- Comment #0 from Don <> 2012-06-15 13:09:28 PDT ---
Seems like a lookup is not attempted if an error has previously occurred in the
module. This example comes from template9.d, and was based on bug 7580.
void deliberateError() { int someError = "abc"; }

void fred()(int value) {}

struct YY
    int  val;
    @property int get()() { return val; }
    alias get this;

void test()
    YY y;

bug.d(1): Error: cannot implicitly convert expression ("abc") of type string to
bug.d(3): Error: template junk.fred() cannot deduce template function from
argument types !()(YY)

The second error disappears if the first line is commented out.

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

Reply via email to