| 1 |
// { dg-do compile { target c++14 } } |
| 2 |
|
| 3 |
struct a { |
| 4 |
void b() {} |
| 5 |
void c(void (*) () = [] { |
| 6 |
if (a a(int auto)JUNK) // { dg-error "two or more data types|condition declares a function" } |
| 7 |
; |
| 8 |
}) {} |
| 9 |
}; |
| 10 |
|
| 11 |
struct d { |
| 12 |
void e() {} |
| 13 |
void f(void (*) () = [] { |
| 14 |
for (;d d(int auto)JUNK;) // { dg-error "two or more data types|condition declares a function" } |
| 15 |
; |
| 16 |
}) {} |
| 17 |
}; |
| 18 |
|
| 19 |
struct g { |
| 20 |
void h() {} |
| 21 |
void i(void (*) () = [] { |
| 22 |
while (g g(int auto)JUNK) // { dg-error "two or more data types|condition declares a function" } |
| 23 |
; |
| 24 |
}) {} |
| 25 |
}; |