@@ -8,10 +8,21 @@ private abstract B({a:A}) from {a:A} {
}
+private typedef T = {a:A};
+
+private abstract C(T) from T {
+ public function getA() {
+ return this.a;
+ }
+}
class Issue2933 extends Test {
function test() {
var a:A = 1;
var b:B = {a: 1};
eq(1, b.getA());
+ var c:C = {a: 1};
+ eq(1, c.getA());
@@ -2543,7 +2543,7 @@ and type_expr ctx (e,p) (with_type:with_type) =
(match follow t with
| TAnon a when not (PMap.is_empty a.a_fields) -> Some a
| TAbstract (a,tl) when not (Meta.has Meta.CoreType a.a_meta) ->
- begin match Codegen.Abstract.get_underlying_type a tl with
+ begin match follow (Codegen.Abstract.get_underlying_type a tl) with
| TAnon a -> Some a
| _ -> None
end