semantic/field-namespace-owned.test \
semantic/field-non-constant.test \
semantic/field-void.test \
+ semantic/foreach-iterator-args.test \
+ semantic/foreach-iterator-void.test \
+ semantic/foreach-iterator-wrong-types.test \
+ semantic/foreach-missing-generic-type.test \
+ semantic/foreach-missing-iterator.test \
+ semantic/foreach-missing-next-value.test \
+ semantic/foreach-next-args.test \
+ semantic/foreach-next-get-args.test \
+ semantic/foreach-next-get-void.test \
+ semantic/foreach-next-missing-get.test \
+ semantic/foreach-next-value-args.test \
+ semantic/foreach-next-value-void.test \
+ semantic/foreach-next-void.test \
+ semantic/foreach-wrong-types.test \
semantic/method-abstract.test \
semantic/method-abstract-body.test \
semantic/method-async-ref-parameter.test \
--- /dev/null
+Invalid Code
+
+public class Iterator<G> {
+}
+
+public class Test<G> {
+ public Iterator<G> iterator (int foo) {
+ return new Iterator<G> ();
+ }
+}
+
+void main () {
+ Test<string?> test = null;
+ foreach (var t in test) {
+ }
+}
--- /dev/null
+Invalid Code
+
+public class Test<G> {
+ public void iterator () {
+ return;
+ }
+}
+
+void main () {
+ Test<string?> test = null;
+ foreach (var t in test) {
+ }
+}
--- /dev/null
+Invalid Code
+
+void main () {
+ var test = new GLib.List<int> ();
+ foreach (string t in test) {
+ }
+}
--- /dev/null
+Invalid Code
+
+void main () {
+ GLib.List test;
+ foreach (var t in test) {
+ }
+}
--- /dev/null
+Invalid Code
+
+public class Test<G> {
+}
+
+void main () {
+ Test<string?> test = null;
+ foreach (var t in test) {
+ }
+}
--- /dev/null
+Invalid Code
+
+public class Iterator<G> {
+}
+
+public class Test<G> {
+ public Iterator<G> iterator () {
+ return new Iterator<G> ();
+ }
+}
+
+void main () {
+ Test<string?> test = null;
+ foreach (var t in test) {
+ }
+}
--- /dev/null
+Invalid Code
+
+public class Iterator<G> {
+ public bool next (string test) {
+ return true;
+ }
+}
+
+public class Test<G> {
+ public Iterator<G> iterator () {
+ return new Iterator<G> ();
+ }
+}
+
+void main () {
+ Test<string?> test = null;
+ foreach (var t in test) {
+ }
+}
--- /dev/null
+Invalid Code
+
+public class Iterator<G> {
+ public bool next () {
+ return true;
+ }
+
+ public G get (int arg) {
+ return (G)null;
+ }
+}
+
+public class Test<G> {
+ public Iterator<G> iterator () {
+ return new Iterator<G> ();
+ }
+}
+
+void main () {
+ Test<string?> test = null;
+ foreach (var t in test) {
+ }
+}
--- /dev/null
+Invalid Code
+
+public class Iterator<G> {
+ public bool next () {
+ return true;
+ }
+
+ public void get () {
+ return;
+ }
+}
+
+public class Test<G> {
+ public Iterator<G> iterator () {
+ return new Iterator<G> ();
+ }
+}
+
+void main () {
+ Test<string?> test = null;
+ foreach (var t in test) {
+ }
+}
--- /dev/null
+Invalid Code
+
+public class Iterator<G> {
+ public bool next () {
+ return true;
+ }
+}
+
+public class Test<G> {
+ public Iterator<G> iterator () {
+ return new Iterator<G> ();
+ }
+}
+
+void main () {
+ Test<string?> test = null;
+ foreach (var t in test) {
+ }
+}
--- /dev/null
+Invalid Code
+
+public class Iterator<G> {
+ public G? next_value (string test) {
+ return null;
+ }
+}
+
+public class Test<G> {
+ public Iterator<G> iterator () {
+ return new Iterator<G> ();
+ }
+}
+
+void main () {
+ Test<string?> test = null;
+ foreach (var t in test) {
+ }
+}
--- /dev/null
+Invalid Code
+
+public class Iterator<G> {
+ public void next_value () {
+ return;
+ }
+}
+
+public class Test<G> {
+ public Iterator<G> iterator () {
+ return new Iterator<G> ();
+ }
+}
+
+void main () {
+ Test<string?> test = null;
+ foreach (var t in test) {
+ }
+}
--- /dev/null
+Invalid Code
+
+public class Iterator<G> {
+ public void next () {
+ return;
+ }
+}
+
+public class Test<G> {
+ public Iterator<G> iterator () {
+ return new Iterator<G> ();
+ }
+}
+
+void main () {
+ Test<string?> test = null;
+ foreach (var t in test) {
+ }
+}
--- /dev/null
+Invalid Code
+
+void main () {
+ string[] test = { "foo", "bar" };
+ foreach (int t in test) {
+ }
+}