goplus / c2go

Convert C to Go
Apache License 2.0
307 stars 21 forks source link

panic: interface conversion: types.Type is *gox.SubstType, not *types.Array #165

Closed visualfc closed 1 year ago

visualfc commented 1 year ago

main.c

int main() {
    int t = 's';
    const int *set;
    if (t == 's') {
        static const int spaces[] = {
        ' ', '\t', '\n', '\r', 11, 12, 0x0085,
        0x2000, 0x2001, 0x2002, 0x2003, 0x2004, 0x2005,
        0x2006, 0x2008, 0x2009, 0x200a,
        0x2028, 0x2029, 0x205f, 0x3000, 0 };
        set = spaces;
    } else {
        goto end;
    }
    if (0) {
end:
        return 1;
    }
    return 0;
}

c2go .

panic: interface conversion: types.Type is *gox.SubstType, not *types.Array