|
@@ -8,6 +8,8 @@ class Issue10143 extends Test {
|
|
|
noAssert();
|
|
|
eq('String', HelperMacros.typeString(Win.test('hello')));
|
|
|
eq('Bool', HelperMacros.typeString(Win.test({field:'world'})));
|
|
|
+ eq('String', HelperMacros.typeString(Win.test(('hello':AString))));
|
|
|
+ eq('Bool', HelperMacros.typeString(Win.test(({field:'world'}:AObj))));
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -16,6 +18,18 @@ private extern class Win {
|
|
|
overload static function test(items:...String):String;
|
|
|
}
|
|
|
|
|
|
+private abstract AString(String) from String {
|
|
|
+ @:to public function toString():String {
|
|
|
+ return this;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+private abstract AObj({field:String}) from {field:String} {
|
|
|
+ @:to public function toObj():{field:String} {
|
|
|
+ return this;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
#else
|
|
|
class Issue10143 extends Test {}
|
|
|
#end
|