view gcc/testsuite/gdc.dg/link.d @ 158:494b0b89df80 default tip

...
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 25 May 2020 18:13:55 +0900
parents 1830386684a0
children
line wrap: on
line source

// { dg-do link { target d_runtime } }

/******************************************/

class C1()
{
    static struct S1 { A1 a; }
}

enum E1 = is(C1!());

/******************************************/
// https://bugzilla.gdcproject.org/show_bug.cgi?id=300

struct S300(Range)
{
    double test(size_t remaining)
    {
        double r;
        return r ^^ remaining;
    }
}

auto link300a(Range)(Range)
{
    return S300!(Range)();
}

void link300()
{
    struct I {}
    static assert(is(typeof(link300a(I())) == struct));
    auto sample = link300a(I());
    sample.test(5);
}

/******************************************/

void main() {}