blob: 151b924a3af9c3d3246b6fe43a08cc3dc67c619f [file] [log] [blame]
Douglas Gregore4e5b052009-03-19 00:18:19 +00001// RUN: clang -fsyntax-only -verify %s
2namespace foo {
3 namespace wibble {
4 struct x { int y; };
5
6 namespace bar {
7 namespace wonka {
8 struct x {
9 struct y { };
10 };
11 }
12 }
13 }
14}
15
16namespace bar {
17 typedef int y;
18}
19void test() {
20 foo::wibble::x a;
21 ::bar::y b;
22 a + b; // expected-error{{invalid operands to binary expression ('foo::wibble::x' (aka 'struct x') and '::bar::y' (aka 'int'))}}
23
24 ::foo::wibble::bar::wonka::x::y c;
25 c + b; // expected-error{{invalid operands to binary expression ('::foo::wibble::bar::wonka::x::y' (aka 'struct y') and '::bar::y' (aka 'int'))}}
26}
27
28int ::foo::wibble::bar::wonka::x::y::* ptrmem;