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:
@@ -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
|
||||
Reference in New Issue
Block a user