From 0d9fff7e01de03f22a09a9ab73d8bd7f0a905f57 Mon Sep 17 00:00:00 2001 From: Juraj Kirchheim Date: Wed, 6 Dec 2017 17:13:01 +0100 Subject: [PATCH] Reverse order in setter bypass to make type inference suffer less. --- src/tink/macro/Constructor.hx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tink/macro/Constructor.hx b/src/tink/macro/Constructor.hx index 8595209..69fc335 100644 --- a/src/tink/macro/Constructor.hx +++ b/src/tink/macro/Constructor.hx @@ -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, } } -} \ No newline at end of file +}