summaryrefslogtreecommitdiff
path: root/lib/BlocksRuntime/tests/constassign.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/BlocksRuntime/tests/constassign.c')
-rw-r--r--lib/BlocksRuntime/tests/constassign.c28
1 files changed, 0 insertions, 28 deletions
diff --git a/lib/BlocksRuntime/tests/constassign.c b/lib/BlocksRuntime/tests/constassign.c
deleted file mode 100644
index 537cb2df0..000000000
--- a/lib/BlocksRuntime/tests/constassign.c
+++ /dev/null
@@ -1,28 +0,0 @@
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-
-//
-// constassign.c
-// bocktest
-//
-// Created by Blaine Garst on 3/21/08.
-//
-// shouldn't be able to assign to a const pointer
-// CONFIG error: assignment of read-only
-
-#import <stdio.h>
-
-void foo(void) { printf("I'm in foo\n"); }
-void bar(void) { printf("I'm in bar\n"); }
-
-int main(int argc, char *argv[]) {
- void (*const fptr)(void) = foo;
- void (^const blockA)(void) = ^ { printf("hello\n"); };
- blockA = ^ { printf("world\n"); } ;
- fptr = bar;
- printf("%s: success\n", argv[0]);
- return 0;
-}