www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 20696] New: Should error when retrieving mangling while the

https://issues.dlang.org/show_bug.cgi?id=20696

          Issue ID: 20696
           Summary: Should error when retrieving mangling while the type
                    is not yet final
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: bugzilla digitalmars.com

Consider:

-----
struct S() {
  int test() {
    pragma(msg, test.mangleof);
    return 3;
  }
}

S!() s;
-----

This should give an error, because attributes that affect mangling are not
known until the semantic analysis is complete.

--
Mar 24