1 // RUN: %clang_cc1 -fblocks -fsyntax-only -verify %s 2 // rdar: // 6182276 3 4 template <typename T, typename T1> void foo(T t, T1 r) 5 { 6 T block_arg; 7 __block T1 byref_block_arg; 8 9 T1 (^block)(T) = ^ T1 (T arg) { 10 byref_block_arg = arg; 11 block_arg = arg; // expected-error {{variable is not assignable (missing __block type specifier)}} 12 return block_arg+arg; }; 13 } 14 15 int main(void) 16 { 17 foo(100, 'a'); // expected-note {{in instantiation of function template specialization 'foo<int, char>' requested here}} 18 } 19 20