-
-
Notifications
You must be signed in to change notification settings - Fork 699
Spurious dual-context error #18065
Copy link
Copy link
Open
Labels
Description
Andrei Alexandrescu (@andralex) reported this on 2021-11-09T18:05:19Z
Transferred from https://issues.dlang.org/show_bug.cgi?id=22497
CC List
- kinke
Description
Consider:
template canon(string v) {
auto fun(alias lambda)(int x) {
return lambda(x);
}
}
alias f1 = canon!"abc".fun;
void main() {
int x = 42;
f1!(y => y + x)(1);
}
The code produces the error:
Deprecation: function `onlineapp.main.f1!((y) => y + x).fun` function requires a dual-context, which is deprecated
There is no dual context anywhere in sight. The canon template takes a compile-time string, which requires no context.
This blocks phobos versioning.Reactions are currently unavailable