Nicolas Cannasse 8 years ago
parent
commit
5d633f120f
1 changed files with 14 additions and 0 deletions
  1. 14 0
      tests/unit/compiler_loops/Issue6038.hx

+ 14 - 0
tests/unit/compiler_loops/Issue6038.hx

@@ -0,0 +1,14 @@
+class Promise<T> {
+    function then<TOut>():Promise<TOut> { return null; }
+}
+
+typedef Thenable<T> = {
+    function then():Thenable<T>;
+}
+
+class Issue6038 {
+    static function main() {
+        var p:Promise<Int> = null;
+        var t:Thenable<Int> = p;
+    }
+}