[Issue 7424] Segfault when trying to call a templated property with different const-ancy.

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Feb 5 13:55:35 PST 2012


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


kennytm at gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|Segfault when trying to     |Segfault when trying to
                   |call a templated property   |call a templated property
                   |with inout.                 |with different const-ancy.


--- Comment #1 from kennytm at gmail.com 2012-02-05 13:55:34 PST ---
Further test cases:

--------------------------------------------------
// Should compile:
struct S7424a
{
    @property inout(int) g()() inout { return 0; }
    void test1() { int f = g; }
    void test2() const { int f = g; }
    void test3() immutable { int f = g; }
}
--------------------------------------------------
// Should fail:
struct S7424b
{
    @property int g()() { return 0; }
    void test() const { int f = g; }
}

struct S7424c
{
    @property int g()() { return 0; }
    void test() immutable { int f = g; }
}

struct S7424d
{
    @property int g()() immutable { return 0; }
    void test() const { int f = g; }
}

struct S7424e
{
    @property int g()() immutable { return 0; }
    void test() { int f = g; }
}

struct S7424f
{
    @property int g()() shared { return 0; }
    void test() { int f = g; }
}

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

-- 
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