Init new repository

This commit is contained in:
Krzosa Karol
2024-04-13 15:29:53 +02:00
commit 5a2e3dcec4
335 changed files with 61571 additions and 0 deletions

66
tests/fpointers.txt Normal file
View File

@@ -0,0 +1,66 @@
ValidProc :: proc(): int {return 1;}
ProcPointer: proc(): int = ValidProc;
ProcT :: typedef proc(): int; @weak
ProcP: ProcT;
main :: proc(): int {
ProcPointer = ValidProc;
ProcPointer = nil;
ProcP = ValidProc;
ProcP = nil;
v: *void;
ProcP = v;
ProcPointer = v;
ProcP = nil;
ProcPointer = ValidProc;
value := ProcPointer(); @unused
ProcP = ValidProc;
ProcP();
v = ProcPointer;
ProcP = ProcPointer;
vv := :*void(ProcPointer);
pv := :ProcT(vv); @unused
pv2 := :proc(): int(vv); @unused
a: *int;
b := :ProcT(a); @unused
c := &ProcP; @unused
return 0;
}
FP :: typedef proc(i: int = 10);
Thing :: struct {
fp: FP;
fp2: proc(i: int);
}
glob0: FP;
glob1: proc(j: int);
Another :: proc() {
thing: Thing;
thing.fp();
thing.fp2(10);
var0: FP;
var1: proc(j: int);
var0();
var1(j = 10);
glob0();
glob1(j = 10);
}