Reverse order in setter bypass to make type inference suffer less.

This commit is contained in:
Juraj Kirchheim
2017-12-06 17:13:01 +01:00
committed by GitHub
parent 45d5f3e0ea
commit 0d9fff7e01

View File

@@ -100,7 +100,7 @@ class Constructor {
case Success(member): member.addMeta(':isVar');
default:
}
addStatement(macro @:pos(pos) (cast this).$name = if (true) $e else this.$name, options.prepend);//TODO: this seems to report type errors here rather than at the declaration position
addStatement(macro @:pos(pos) (cast this).$name = if (false) this.$name else $e, options.prepend);//TODO: this seems to report type errors here rather than at the declaration position
}
else
addStatement(macro @:pos(pos) this.$name = $e, options.prepend);
@@ -136,4 +136,4 @@ class Constructor {
meta : this.meta,
}
}
}
}