mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 21:21:48 +03:00

the deprecation message talks about the function we are using, not some arbitrary example that you would use "such as" with.
21 lines
507 B
D
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);
|
|
}
|