소스 검색

[java/cs] Add test. Closes #4203

Cauê Waneck 9 년 전
부모
커밋
4d4a72235b
1개의 변경된 파일29개의 추가작업 그리고 0개의 파일을 삭제
  1. 29 0
      tests/unit/src/unit/issues/Issue4203.hx

+ 29 - 0
tests/unit/src/unit/issues/Issue4203.hx

@@ -0,0 +1,29 @@
+package unit.issues;
+
+class Issue4203 extends Test {
+	public function test() {
+#if !cpp
+		var val = new Thing1(true);
+		eq(val.getIt(), true);
+		t(val.getIt());
+#end
+	}
+}
+
+#if !cpp
+@:nativeGen
+private interface NativeItem<T> {
+    public function getIt() : T;
+}
+
+private class Thing1 implements NativeItem<Bool> {
+    var value: Bool;
+    public function new(value) {
+        this.value = value;
+    }
+
+    public function getIt() : Bool {
+        return value;
+    }
+}
+#end