dmd/compiler/test/fail_compilation/fail15414.d
WebFreak001 55d9d5aa35 make deprecation message less confusing
the deprecation message talks about the function we are using, not some arbitrary example that you would use "such as" with.
2023-05-17 15:22:02 +02:00

21 lines
507 B
D

// https://issues.dlang.org/show_bug.cgi?id=15414
// REQUIRED_ARGS: -de
/*
TEST_OUTPUT:
---
fail_compilation/fail15414.d(20): Deprecation: `__traits(getAttributes)` may only be used for individual functions, not the overload set `fun`
fail_compilation/fail15414.d(20): the result of `__traits(getOverloads)` may be used to select the desired function to extract attributes from
---
*/
@("gigi")
void fun() {}
@("mimi")
void fun(int) {}
void main()
{
auto t = __traits(getAttributes, fun);
}