[Issue 7424] New: Segfault when trying to call a templated property with inout.

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Feb 2 09:45:29 PST 2012


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

           Summary: Segfault when trying to call a templated property with
                    inout.
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: ice
          Severity: regression
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: kennytm at gmail.com


--- Comment #0 from kennytm at gmail.com 2012-02-02 09:45:27 PST ---
Test case:

-----------------
struct S7424
{
    @property inout(int) g()() inout
    {
        return 0;
    }
    void test()
    {
        int f = g;
    }
}
-----------------

The @property is optional. Compile with 'dmd -c bug7424.d'.

The expression 'this.g()' has a NULL 'type', so the statement at
expression.c:10112

        Type *t2 = e2->type->toBasetype();

caused SEGFAULT.

The regression is introduced in commit
1d4438f151143fcdcb807e257959dd1d588f9048.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list