Add workaround for HaxeFoundation/haxe#6830.
This commit is contained in:
@@ -109,7 +109,10 @@ class Sisyphus {
|
|||||||
pack: baseType.pack,
|
pack: baseType.pack,
|
||||||
name: name,
|
name: name,
|
||||||
sub: sub,
|
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));
|
||||||
|
}],
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,6 +45,10 @@ class Types extends Base {
|
|||||||
MacroApi.pos().makeBlankType().toString();
|
MacroApi.pos().makeBlankType().toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function testExpr() {
|
||||||
|
assertEquals('VarChar<255>', (macro : VarChar<255>).toType().sure().toComplex().toString());
|
||||||
|
}
|
||||||
|
|
||||||
function testToComplex() {
|
function testToComplex() {
|
||||||
assertEquals('String', Context.getType('String').toComplex().toString());
|
assertEquals('String', Context.getType('String').toComplex().toString());
|
||||||
assertEquals('tink.CoreApi.Noise', Context.getType('tink.CoreApi.Noise').toComplex().toString());
|
assertEquals('tink.CoreApi.Noise', Context.getType('tink.CoreApi.Noise').toComplex().toString());
|
||||||
|
|||||||
1
tests/VarChar.hx
Normal file
1
tests/VarChar.hx
Normal file
@@ -0,0 +1 @@
|
|||||||
|
typedef VarChar<@:const L> = String;
|
||||||
Reference in New Issue
Block a user