This commit is contained in:
Juraj Kirchheim
2018-01-31 15:43:52 +01:00
parent f271cc880a
commit f269d13abf
3 changed files with 9 additions and 1 deletions

View File

@@ -109,7 +109,10 @@ class Sisyphus {
pack: baseType.pack,
name: name,
sub: sub,
params: [ for (t in params) TPType(toComplexType(t)) ],
params: [for (t in params) switch t {
case TInst(_.get().kind => KExpr(e), _): TPExpr(e);
default: TPType(toComplexType(t));
}],
}
}
}

View File

@@ -45,6 +45,10 @@ class Types extends Base {
MacroApi.pos().makeBlankType().toString();
}
function testExpr() {
assertEquals('VarChar<255>', (macro : VarChar<255>).toType().sure().toComplex().toString());
}
function testToComplex() {
assertEquals('String', Context.getType('String').toComplex().toString());
assertEquals('tink.CoreApi.Noise', Context.getType('tink.CoreApi.Noise').toComplex().toString());

1
tests/VarChar.hx Normal file
View File

@@ -0,0 +1 @@
typedef VarChar<@:const L> = String;