Compare commits

...

2 Commits

Author SHA1 Message Date
Juraj Kirchheim
b7e413d839 Release 0.17.2 2018-10-05 09:23:32 +02:00
Juraj Kirchheim
e1e487079b Add Exprs.as for ECheckType. 2018-10-03 11:50:21 +02:00
2 changed files with 7 additions and 4 deletions

View File

@@ -9,8 +9,8 @@
"contributors": [
"back2dos"
],
"version": "0.17.1",
"releasenote": "Improve type parameter treatment. Add helper for getting field suggestions. Make type comparator available.",
"version": "0.17.2",
"releasenote": "Add Exprs.as for ECheckType.",
"tags": [
"tink",
"macro",

View File

@@ -43,8 +43,11 @@ class Exprs {
}
static public inline function is(e:Expr, c:ComplexType)
return ECheckType(e, c).at(e.pos).typeof().isSuccess();
return e.as(c).typeof().isSuccess();
static public inline function as(e:Expr, c:ComplexType)
return ECheckType(e, c).at(e.pos);
static public function finalize(e:Expr, ?nuPos:Position, ?rules:Dynamic<String>, ?skipFields = false, ?callPos:PosInfos) {
if (nuPos == null)
nuPos = Context.currentPos();