[Issue 9057] Regression(Beta): Segfault or "Non-constant expression" error with local import

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Nov 28 00:42:44 PST 2012


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


Don <clugdbug at yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice
            Summary|Non-constant expression     |Regression(Beta): Segfault
                   |error in biguintcore        |or "Non-constant
                   |                            |expression" error with
                   |                            |local import


--- Comment #1 from Don <clugdbug at yahoo.com.au> 2012-11-28 00:42:42 PST ---
Reduced test case shows it is related to the local import.
Looks as though semantic isn't being run on the array literal.
In the first case, it segfaults because the array literal type is still NULL.
------------------ 
struct Bug9057(T)
{
    T x;
}

void test9507() {
    import thug;
    Bug9057!(BugInt) xxx;
}
------------------ thug.d, case 1. Segfault
struct BugInt
{
    uint[] data = [0];
}
------------------ thug.d, case 2: "Non-constant expression ZEROX"
struct BugInt
{
    uint[] data = ZEROX;  
}
enum uint [] ZEROX = [0];

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