@:nativeGen class C {} class C2 {} abstract A(C) { function f():C2 return null; static function foo(a:A) return a.f(); }