Explorar el Código

add test (closes #2184)

Simon Krajewski hace 11 años
padre
commit
9372460dd8
Se han modificado 1 ficheros con 13 adiciones y 0 borrados
  1. 13 0
      tests/unit/issues/Issue2184.hx

+ 13 - 0
tests/unit/issues/Issue2184.hx

@@ -0,0 +1,13 @@
+package unit.issues;
+
+private abstract BoxedInt({ val : Int }) from { val : Int } {
+	public function new (v: { val :Int }) this = v;
+	@:to public function toInt():Int return this.val;
+}
+
+class Issue2184 extends Test {
+	function test() {
+		var test = function () return new BoxedInt({ val : 5 });
+		t(unit.TestType.typeError(var z:Void->Int = test));
+	}
+}