Files
jpexs-decompiler/libsrc/ffdec_lib/testdata/as3_new/src/tests/TestNames.as
T
Jindra Petřík 3771e02ba2 Fixed #1006 AS3 - Warning - Function value used where type Boolean was expected
as3_new testdata compilers do not ignore warnings
as3_new testdata without warnings
2022-12-18 23:10:24 +01:00

47 lines
884 B
ActionScript

package tests
{
import tests_other.myInternal;
import tests_other.myInternal2;
public class TestNames
{
myInternal var neco:int;
myInternal2 var neco:int;
internal var nic:int;
public function run():*
{
var ns:* = this.getNamespace();
var name:* = this.getName();
var a:* = ns::unnamespacedFunc();
var b:* = ns::[name];
trace(b.c);
var c:* = myInternal::neco;
use namespace myInternal2;
var d:* = neco;
}
public function getNamespace():Namespace
{
return myInternal;
}
public function getName():String
{
return "unnamespacedFunc";
}
myInternal function namespacedFunc() : void
{
trace("hello");
}
myInternal2 function namespacedFunc2() : void
{
trace("hello");
}
}
}