瀏覽代碼

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' );
+    }
+
+}