summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-shadow3.C
blob: 836432191c71ca5cc34aa714fea95feee8aabbf8 (plain)
1
2
3
4
5
6
// { dg-do compile { target c++11 } }

int main() {
  int x = 42;
  auto lambda = [x](int x) {}; // { dg-error "previously declared as a capture" }
}