We are working! POLYMORPHS There was an error where we have to reconstruct exact

typespec from type. This means we will probably have problems with namespaces!!
This commit is contained in:
Krzosa Karol
2023-04-02 15:07:47 +02:00
parent c4b27bf604
commit 41d2baa56b
5 changed files with 30 additions and 10 deletions

View File

@@ -52,7 +52,7 @@ MultipleArgs :: (): Tuple(int, F32)
return {32, 32}
PolyLambda :: ($T: Type = *int): T
return 32
return 0
PolyType :: (a: $T): T
return a
@@ -92,11 +92,12 @@ main :: (argc: int, argv: **char): int
Test(10, b = 10, c = 20)
Test(a = 10, b = 10, c = 20)
value := PolyLambda(**int)
PolyType_r1 := PolyType(10)
PolyType_r2 := PolyType(int)
// PolyType_r3 := PolyType(array)
// PolyType_r4 := PolyType(seventh)
// value := PolyLambda(**int)
// PolyType_r1 := PolyType(10)
// PolyType_r2 := PolyType(int)
PolyType_r5 := PolyType(seventh)
// PolyType_r3 := PolyType(test)
// PolyType_r4 := PolyType(test_a)
// PolyType_r5 := PolyType(sixth)
return 0