control-flow/nested-conditional.vala \
control-flow/switch.vala \
control-flow/sideeffects.vala \
+ control-flow/bug628336.vala \
control-flow/bug639482.vala \
control-flow/bug652549.vala \
control-flow/bug661985.vala \
asynchronous/bug661961.vala \
asynchronous/bug742621.vala \
asynchronous/closures.vala \
+ asynchronous/yield.vala \
dbus/basic-types.test \
dbus/arrays.test \
dbus/structs.test \
--- /dev/null
+async void foo ()
+{
+ while (true) {
+ yield;
+ }
+}
+
+void main () {
+}
+
--- /dev/null
+void main () {
+ var foo = new string[]{"bar", "bar"};
+ foreach (string bar in foo) {
+ assert (bar == "bar");
+ SourceFunc f = () => bar == "bar";
+ assert (f ());
+ }
+}
}
}
+namespace TestInterface {
+ [DBus (name = "org.vala.Test.Bar")]
+ public interface Bar : GLib.Object {
+ public abstract HashTable<string, Variant> foo () throws IOError;
+ }
+
+ public class Foo : GLib.DBusProxy, Bar {
+ public HashTable<string, Variant> foo () throws IOError {
+ return new HashTable<string, Variant> (str_hash, str_equal);
+ }
+ }
+}
+
MainLoop main_loop;
void client_exit (Pid pid, int status) {
Foo func = () => { foo (); };
func ();
}
+
+
+ void active_scope () {
+ foreach (var bar in new string[] {}) {
+ }
+
+ var bar = "bar";
+ }
}
void main () {
public abstract int abstract_base_property { get; set; }
}
+enum FooEnum {
+ FOO
+}
+
+abstract class Maman.EnumDefault {
+ public abstract FooEnum bar { get; default = FooEnum.FOO; }
+}
+
class Maman.Bar : Foo {
public int public_property { get; set; default = 3; }
public override int abstract_base_property { get; set; }
public int field;
}
+
+delegate void Func ();
+
+struct StructWithFunc {
+ int foo;
+
+ public StructWithFunc (Func f) {
+ }
+}
+
void test_in_parameter (SimpleStruct st) {
stdout.printf ("test_in_parameter: st.field = %d\n", st.field);
}
st.field = 3;
}
+void test_struct_with_func () {
+ var foes = new StructWithFunc[] {
+ StructWithFunc (() => {})
+ };
+}
+
void main () {
stdout.printf ("Structs Test:\n");