mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-09-27 09:00:46 +00:00
Fixed #1937 AS3 - declarations vs null
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
package tests
|
||||
{
|
||||
|
||||
public class TestDeclarationInterface
|
||||
{
|
||||
public function run(): MyIFace
|
||||
{
|
||||
var i:MyIFace = null;
|
||||
var n:int = 2;
|
||||
switch(n) {
|
||||
case 0:
|
||||
i = new MyClass();
|
||||
break;
|
||||
case 1:
|
||||
i = new MyClass2();
|
||||
break;
|
||||
}
|
||||
return i;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
interface MyIFace {
|
||||
|
||||
}
|
||||
|
||||
class MyClass implements MyIFace {
|
||||
|
||||
}
|
||||
|
||||
class MyClass2 implements MyIFace {
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user