From a04aec33fc3b770177f113dd17115421c1177ce6 Mon Sep 17 00:00:00 2001 From: Simon Krajewski Date: Sat, 29 Mar 2014 23:12:32 +0100 Subject: [PATCH] Revert "(Flash9) use real field name to check for overrides (closes #2785)" This reverts commit 00ba7931274e2c08f195699859e00cb99ef35c1f. --- genswf9.ml | 6 +++--- tests/unit/issues/Issue2785.hx | 34 ---------------------------------- 2 files changed, 3 insertions(+), 37 deletions(-) delete mode 100644 tests/unit/issues/Issue2785.hx diff --git a/genswf9.ml b/genswf9.ml index 754cb1fab2a..99cd2ae34d0 100644 --- a/genswf9.ml +++ b/genswf9.ml @@ -2016,7 +2016,7 @@ let generate_field_kind ctx f c stat = Some (HFMethod { hlm_type = m; hlm_final = stat || (Meta.has Meta.Final f.cf_meta); - hlm_override = not stat && loop c f.cf_name; (* use real field name to check for overrides (issue #2785) *) + hlm_override = not stat && loop c name; hlm_kind = kind; }) ); @@ -2044,7 +2044,7 @@ let generate_field_kind ctx f c stat = hlv_value = HVNone; hlv_const = false; }) - + let check_constructor ctx c f = (* check that we don't assign a super Float var before we call super() : will result in NaN @@ -2061,7 +2061,7 @@ let check_constructor ctx c f = loop f.tf_expr with Exit -> () - + let generate_class ctx c = let name = type_path ctx c.cl_path in ctx.cur_class <- c; diff --git a/tests/unit/issues/Issue2785.hx b/tests/unit/issues/Issue2785.hx deleted file mode 100644 index 85aedf00614..00000000000 --- a/tests/unit/issues/Issue2785.hx +++ /dev/null @@ -1,34 +0,0 @@ -package unit.issues; -import unit.Test; - -private class Base { - public function new() {} - - @:extern - public var foo(default, never):Int; - - @:getter(foo) - @:keep - public function get_foo() { - return 1; - } -} - -private class Child extends Base { - @:getter(foo) - override public function get_foo() { - return 2; - } -} - -class Issue2785 extends Test { - #if flash - function test() { - var base = new Base(); - eq(1, base.foo); - - var child = new Child(); - eq(2, child.foo); - } - #end -} \ No newline at end of file