blob: 0e27a9de6d9a19dbb50fb9731c5b94931726af1c [file] [log] [blame]
// { dg-require-effective-target c++14 }
void test_1 ()
{
auto lambda = [val = 2](){};
lambda.val; // { dg-bogus "did you mean" }
// { dg-error "has no member named 'val'" "" { target *-*-* } .-1 }
}
int test_2 ()
{
auto lambda = [val = 2](){ return val; };
// TODO: should we issue an error for the following assignment?
lambda.__val = 4;
return lambda();
}