This needs to be fixed
Steven Schveighoffer
schveiguy at gmail.com
Wed Aug 28 02:34:57 UTC 2024
On Monday, 26 August 2024 at 05:25:00 UTC, Walter Bright wrote:
> Please post complete examples of the cases, instead of just the
> line with the error message. The missing lines are critical to
> understanding the bug report.
```d
struct T
{
void myFun(int) {}
}
T instance;
enum funName = "myFun";
void main()
{
int args = 0;
alias fun = __traits(getMember, instance, funName);
return fun(args); // error : calling non-static function
`myFun` requires an instance of type `T`
}
```
-Steve
More information about the Digitalmars-d
mailing list