view gcc/testsuite/gdc.test/fail_compilation/e7804_2.d @ 19:2b5abeee2509 default tip

update gcc11
author anatofuz
date Mon, 25 May 2020 07:50:57 +0900
parents
children
line wrap: on
line source

/*
TEST_OUTPUT:
---
fail_compilation/e7804_2.d(17): Error: `__traits(getMember, Foo, "func")` does not give a valid type
---
*/

module e7804_2;

class Foo
{
     void func(){}
}

void test()
{
    __traits(getMember, Foo, "func") var;
    auto a = cast(__traits(getMember, Foo, "func")) 0;
}