소스 검색

add test (closes #2224)

Simon Krajewski 11 년 전
부모
커밋
eb79c97244
1개의 변경된 파일28개의 추가작업 그리고 0개의 파일을 삭제
  1. 28 0
      tests/unit/issues/Issue2224.hx

+ 28 - 0
tests/unit/issues/Issue2224.hx

@@ -0,0 +1,28 @@
+package unit.issues;
+
+class Issue2224 extends unit.Test {
+
+	function test() {
+		eq("opt=null", getEF1());
+		eq("opt=null", getEF2());
+		eq("opt=null", getInt());
+		eq("opt=null", getClass());
+	}
+
+    static function getEF1( ?opt : Null<haxe.EnumFlags<MyEnum>> ){
+        return( 'opt=$opt' );
+    }
+
+    static function getEF2( ?opt : haxe.EnumFlags<MyEnum> ){
+        return( 'opt=$opt' );
+    }
+
+    static function getInt( ?opt : Int ){
+        return( 'opt=$opt' );
+    }
+
+    static function getClass( ?opt : MyClass ){
+        return( 'opt=$opt' );
+    }
+
+}