1 // Test that captures are not named in the closure type. 2 // { dg-do compile { target c++14 } } 3 main()4 int main() 5 { 6 int i; 7 auto lam = [i,j=42]{}; 8 lam.j; // { dg-error "no member" } 9 lam.i; // { dg-error "no member" } 10 } 11