Repository: flex-asjs Updated Branches: refs/heads/develop 8881856aa -> ff96b9cbb
[BUGFIX] Changed Reflection framework classes to support alternate reflection data format, permitting static and instance members with the same name. Note: This changes requires a corresponding change in the Falcon-jx compiler to support the output format change. Misc: fixed a minor error in GenericTests Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/7ae11fb3 Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/7ae11fb3 Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/7ae11fb3 Branch: refs/heads/develop Commit: 7ae11fb3bd3647cee5dcfcd709de4e1fac78e04c Parents: 896142f Author: greg-dove <greg.d...@gmail.com> Authored: Sat Feb 25 16:06:04 2017 +1300 Committer: greg-dove <greg.d...@gmail.com> Committed: Sat Feb 25 16:06:04 2017 +1300 ---------------------------------------------------------------------- .../main/flex/org/apache/flex/reflection/TypeDefinition.as | 9 ++++++--- .../src/flexUnitTests/observedbugs/ObservedBugTests.as | 4 ++-- 2 files changed, 8 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/7ae11fb3/frameworks/projects/Reflection/src/main/flex/org/apache/flex/reflection/TypeDefinition.as ---------------------------------------------------------------------- diff --git a/frameworks/projects/Reflection/src/main/flex/org/apache/flex/reflection/TypeDefinition.as b/frameworks/projects/Reflection/src/main/flex/org/apache/flex/reflection/TypeDefinition.as index f0d2c47..4080f5a 100755 --- a/frameworks/projects/Reflection/src/main/flex/org/apache/flex/reflection/TypeDefinition.as +++ b/frameworks/projects/Reflection/src/main/flex/org/apache/flex/reflection/TypeDefinition.as @@ -692,7 +692,7 @@ COMPILE::SWF { accessors : AccessorDefinition, methods : MethodDefinition }; - if (!collection in lookups) throw new Error("ArgumentError: name must be a standard name [variables,accessors,methods]") ; + if (!(collection in lookups)) throw new Error("ArgumentError: name must be a standard name [variables,accessors,methods]") ; var isStatic:Boolean = type == "static"; var results:Array = []; @@ -729,10 +729,13 @@ COMPILE::SWF { var itemDef:Object = items[item]; if (isStatic) { //we are looking for static members only - if ( itemDef.isStatic) results[i++] = new itemClass(item, itemDef); + if (item.charAt(0)=="|") results[i++] = new itemClass(item.substr(1), itemDef); + + // if ( itemDef.isStatic) results[i++] = new itemClass(item, itemDef); } else { //ignore statics here, because this is for instance members: - if (itemDef.isStatic) continue; + if (item.charAt(0)=="|") continue; + //if (itemDef.isStatic) continue; //instance member: var itemClassDef:DefinitionWithMetaData = new itemClass(item, itemDef); if (resolve) { http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/7ae11fb3/manualtests/GenericTests/src/flexUnitTests/observedbugs/ObservedBugTests.as ---------------------------------------------------------------------- diff --git a/manualtests/GenericTests/src/flexUnitTests/observedbugs/ObservedBugTests.as b/manualtests/GenericTests/src/flexUnitTests/observedbugs/ObservedBugTests.as index 46887ac..8f3006a 100644 --- a/manualtests/GenericTests/src/flexUnitTests/observedbugs/ObservedBugTests.as +++ b/manualtests/GenericTests/src/flexUnitTests/observedbugs/ObservedBugTests.as @@ -69,7 +69,7 @@ package flexUnitTests.observedbugs js = 2; } - Assert.assertTrue("Unexpected value following try/catch",(isJS ? (js == 2) : (js == 1)); + Assert.assertTrue("Unexpected value following try/catch",(isJS ? (js == 2) : (js == 1))); } @@ -91,7 +91,7 @@ package flexUnitTests.observedbugs /* if (check == null) { js = true; }*/ - Assert.assertTrue("Unexpected value following try/catch",(isJS ? (js == true) : (js == false)); + Assert.assertTrue("Unexpected value following try/catch",(isJS ? (js == true) : (js == false))); }