--- /dev/null
+class C {
+typedef global void global_fptr(int i);
+}
--- /dev/null
+#! [contains] can't use non global fptr of other class
+class C {
+ typedef void t_ptr() {}
+}
+class D {
+ typedef void t_ptr() {}
+ C->t_ptr ptr;
+}
--- /dev/null
+123 => global int g_i;
+class global C {
+ 13 => int i;
+}
+<<< g_i >>>;
+global C g_c;
+<<< g_c, "->i => ", g_c.i >>>;
+fun global void g_test() { <<< g_i >>>; <<< g_c >>>; <<< g_c.i >>>; <<< "test" >>>; }
+#!fun global void g_test() { <<< "test" >>>; }
+<<< g_test >>>;
+<<< g_test() >>>;
--- /dev/null
+<<< int i >>>;
+fun global void this_global_func_will_fail_to_compile() {
+ <<< i >>>;
+}
--- /dev/null
+#! [contains] global function 'test' already defined for those arguments
+fun void test(){}
+fun void test(){}
--- /dev/null
+<<< global int g_i >>>;
--- /dev/null
+#! [contains] 'global' can only be used at class scope
+class C {
+ {
+ global int i;
+ }
+}
--- /dev/null
+#! [contains] 'global' can only be used at file scope
+{
+global int i;
+}
--- /dev/null
+#! [contains] is not global
+class C {
+
+}
+
+global C c;
--- /dev/null
+class global C {
+ fun static void t<~A~>() { <<< __func__ >>>; }
+}
+class D extends C {
+
+}
+
+fun void test(C c) {
+ C.t<~int~>();
+}
+
+#!D d;
+#!d.t<~int~>();
+#!d => test;
--- /dev/null
+struct global GlobalStruct {
+ int i;
+ float f;
+ string s;
+}
+
+struct global GlobalStructWithCtor {
+ int i;
+ float f;
+ string s;
+}
+
+global GlobalStruct s;
+GlobalStructWithCtor sctor;