inherit SWFOverride metadata so subclassers don't have to copy it but the SWFTarget doesn't have to go look up the ancestor chain for it
Project: http://git-wip-us.apache.org/repos/asf/flex-falcon/repo Commit: http://git-wip-us.apache.org/repos/asf/flex-falcon/commit/4763528b Tree: http://git-wip-us.apache.org/repos/asf/flex-falcon/tree/4763528b Diff: http://git-wip-us.apache.org/repos/asf/flex-falcon/diff/4763528b Branch: refs/heads/develop Commit: 4763528bbab2a9fb8ae625507c169193f62db84f Parents: deb47fc Author: Alex Harui <[email protected]> Authored: Fri Dec 2 22:12:06 2016 -0800 Committer: Alex Harui <[email protected]> Committed: Mon Dec 5 09:12:17 2016 -0800 ---------------------------------------------------------------------- .../internal/definitions/FunctionDefinition.java | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/4763528b/compiler/src/main/java/org/apache/flex/compiler/internal/definitions/FunctionDefinition.java ---------------------------------------------------------------------- diff --git a/compiler/src/main/java/org/apache/flex/compiler/internal/definitions/FunctionDefinition.java b/compiler/src/main/java/org/apache/flex/compiler/internal/definitions/FunctionDefinition.java index 0106213..8f98c11 100644 --- a/compiler/src/main/java/org/apache/flex/compiler/internal/definitions/FunctionDefinition.java +++ b/compiler/src/main/java/org/apache/flex/compiler/internal/definitions/FunctionDefinition.java @@ -450,8 +450,26 @@ public class FunctionDefinition extends ScopedDefinitionBase implements IFunctio return hasCompatibleSignature(other, project); } + private boolean copiedMetaData = false; + public boolean hasCompatibleSignature(IFunctionDefinition other, ICompilerProject project) { + if (!copiedMetaData) + { + if (other.isImplementation(project)) + { + copiedMetaData = true; + IMetaTag myTag = this.getMetaTagByName(IMetaAttributeConstants.ATTRIBUTE_SWFOVERRIDE); + if (myTag == null) + { + IMetaTag tag = other.getMetaTagByName(IMetaAttributeConstants.ATTRIBUTE_SWFOVERRIDE); + if (tag != null) + { + this.addMetaTag(tag); + } + } + } + } // Compare return types. ITypeDefinition returnType1 = resolveReturnType(project); ITypeDefinition returnType2 = other.resolveReturnType(project);
