summaryrefslogtreecommitdiff
path: root/tests/delegates/incompatible-assignment.test
diff options
context:
space:
mode:
Diffstat (limited to 'tests/delegates/incompatible-assignment.test')
-rw-r--r--tests/delegates/incompatible-assignment.test15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/delegates/incompatible-assignment.test b/tests/delegates/incompatible-assignment.test
new file mode 100644
index 000000000..1cd8c9fac
--- /dev/null
+++ b/tests/delegates/incompatible-assignment.test
@@ -0,0 +1,15 @@
+Invalid Code
+
+[CCode (has_target = false)]
+delegate void Foo (string s);
+
+class Bar {
+ public void foo () {
+ }
+}
+
+void main () {
+ var bar = new Bar ();
+ Foo foo;
+ foo = bar.foo;
+}