Repository: flex-sdk
Updated Branches:
refs/heads/develop 44eaf8a69 -> fa89e840b
Compiler: fixed an issue where adding a subclass of a Vector's type to the
Vector in MXML would result in an internal build error because the subclass
didn't get added as a dependency.
Example MXML that causes build error:
<fx:Vector type="mx.core.UIComponent">
<s:Button/>
</fx:Vector>
I discovered that it would work fine if another Button was added elsewhere in
the MXML document, so I figured that somehow the Vector's items weren't checked
for dependencies.
Fixed by passing the VectorNode to the same analyze() function used for
ArrayNode in the private DependencyAnalyzer class in InterfaceCompiler at the
end of the analyze() function for VectorNode. There is no analyze() function
for ArrayNode, so I determined that it must fall back to the version with the
parameter typed as Node. Originally, the analyze() function for VectorNode only
grabbed the Vector's type as a dependency and didn't look at the items added to
the Vector.
Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/ffdb0714
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/ffdb0714
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/ffdb0714
Branch: refs/heads/develop
Commit: ffdb0714ed73bce50a0de079c3144f95aad12bd7
Parents: aac79ae
Author: Josh Tynjala <[email protected]>
Authored: Tue May 26 14:31:50 2015 -0700
Committer: Josh Tynjala <[email protected]>
Committed: Tue May 26 14:31:50 2015 -0700
----------------------------------------------------------------------
.../src/java/flex2/compiler/mxml/InterfaceCompiler.java | 5 +++++
1 file changed, 5 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/ffdb0714/modules/compiler/src/java/flex2/compiler/mxml/InterfaceCompiler.java
----------------------------------------------------------------------
diff --git
a/modules/compiler/src/java/flex2/compiler/mxml/InterfaceCompiler.java
b/modules/compiler/src/java/flex2/compiler/mxml/InterfaceCompiler.java
index 1bf6536..b1dfddd 100644
--- a/modules/compiler/src/java/flex2/compiler/mxml/InterfaceCompiler.java
+++ b/modules/compiler/src/java/flex2/compiler/mxml/InterfaceCompiler.java
@@ -1796,6 +1796,11 @@ public class InterfaceCompiler extends
flex2.compiler.AbstractSubCompiler implem
{
String className = (String) getLanguageAttributeValue(node,
StandardDefs.PROP_TYPE);
requestType(NameFormatter.toColon(className), node);
+
+ // the items in a Vector may be subclasses of the Vector's type,
and
+ // those subclasses may not have been used anywhere else, so we
+ // can't assume that requesting the Vector's type is enough.
+ analyze((Node) node);
}
public void analyze(DefinitionNode node)