|
@@ -84,6 +84,23 @@ private class B extends A {
|
|
public function new() {}
|
|
public function new() {}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+@:import("native_python.sample", "A")
|
|
|
|
+extern class ExternClass {
|
|
|
|
+ function new();
|
|
|
|
+ function f(v:Int):Int;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+@:import("native_python.sample", "A.Nested")
|
|
|
|
+extern class ExternNestedClass {
|
|
|
|
+ function new();
|
|
|
|
+ function f(v:Int):Int;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+@:import("native_python.sample")
|
|
|
|
+extern class ExternModule {
|
|
|
|
+ static function f(v:Int):Int;
|
|
|
|
+}
|
|
|
|
+
|
|
class TestPython extends Test {
|
|
class TestPython extends Test {
|
|
|
|
|
|
public function testDoWhileAsExpression () {
|
|
public function testDoWhileAsExpression () {
|
|
@@ -303,4 +320,11 @@ class TestPython extends Test {
|
|
eq(test4a(1), test4b(1));
|
|
eq(test4a(1), test4b(1));
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ function testExtern()
|
|
|
|
+ {
|
|
|
|
+ eq(new ExternClass().f(1), 2);
|
|
|
|
+ eq(new ExternNestedClass().f(1), 3);
|
|
|
|
+ eq(ExternModule.f(1), 4);
|
|
|
|
+ }
|
|
|
|
+
|
|
}
|
|
}
|