summaryrefslogtreecommitdiff
path: root/clang/test/SemaObjCXX/NSString-type.mm
blob: 10338667b78bea478dd828e5a84d785474dff1a3 (about) (plain)
1
2
3
4
5
6
7
8
9
10
// RUN: %clang_cc1 -x objective-c++ -triple x86_64-apple-darwin10 -fblocks -fsyntax-only -verify %s
// rdar://10907410

void test(id pid, Class pclass) {
  void (^block)(void) = @"help"; // expected-error {{cannot initialize a variable of type 'void (^)()' with an rvalue of type 'NSString *'}}
  void (^block1)(void) = pid;
  void (^block2)(void) = @"help"; // expected-error {{cannot initialize a variable of type 'void (^)()' with an rvalue of type 'NSString *'}}
  void (^block3)(void) = @"help"; // expected-error {{cannot initialize a variable of type 'void (^)()' with an rvalue of type 'NSString *'}}
}