Jelajahi Sumber

add test (closes #2224)

Simon Krajewski 11 tahun lalu
induk
melakukan
eb79c97244
1 mengubah file dengan 28 tambahan dan 0 penghapusan
  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' );
+    }
+
+}