@@ -14,6 +14,7 @@
flash9 : only init dynamic methods if not already defined (in subclass)
std : added haxe.SHA1
compiler : added TCast, allow cast optimization on flash9/cpp
+ as3 : fixed Std.__init__ generating 'null'
2010-01-09: 2.05
js : added js.Scroll
@@ -665,7 +665,10 @@ let init_class ctx c p herits fields =
tf_type = ret;
tf_expr = e;
} in
- if stat && name = "__init__" then c.cl_init <- Some e;
+ if stat && name = "__init__" then
+ (match e.eexpr with
+ | TBlock [] | TBlock [{ eexpr = TConst _ }] | TConst _ | TObjectDecl [] -> ()
+ | _ -> c.cl_init <- Some e);
cf.cf_expr <- Some (mk (TFunction f) t p);
t
) in