blob: 12f4f4f3401fc820ef73eaa0dda481cb3ba1cd36 [file] [log] [blame]
Fariborz Jahanian05865202011-12-03 17:47:53 +00001// RUN: %clang_cc1 %s -fsyntax-only -verify -fblocks
2// rdar://10466373
3
4typedef short SHORT;
5
6void f0() {
7 (void) ^{
8 if (1)
9 return (float)1.0;
10 else if (2)
11 return (double)2.0; // expected-error {{return type 'double' must match previous return type 'float' when block literal has}}
12 else
13 return (SHORT)3; // expected-error {{return type 'SHORT' (aka 'short') must match previous return type 'float' when}}
14 };
15}