[Issue 20388] New: Parse error when compiling lambdas in mixins as template parameters
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Nov 13 11:34:11 UTC 2019
https://issues.dlang.org/show_bug.cgi?id=20388
Issue ID: 20388
Summary: Parse error when compiling lambdas in mixins as
template parameters
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: regression
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: johannes.riecken at gmail.com
Fails with dmd 2.088:
```
void main() {
foo!(mixin("(int a) { return a; }"))();
}
void foo(alias t)() {
}
```
Error:
```
/tmp/foo.d-mixin-2(2): Error: basic type expected, not (
/tmp/foo.d-mixin-2(2): Error: function declaration without return type. (Note
that constructors are always named this)
```
This is expected to compile and did compile in previous dmd versions.
--
More information about the Digitalmars-d-bugs
mailing list