flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aha...@apache.org
Subject [5/7] git commit: [flex-falcon] [refs/heads/develop] - [Bindable] class with toString needs to have it converted to be an override
Date Tue, 17 Sep 2013 19:04:50 GMT
[Bindable] class with toString needs to have it converted to be an override


Project: http://git-wip-us.apache.org/repos/asf/flex-falcon/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-falcon/commit/62a28e30
Tree: http://git-wip-us.apache.org/repos/asf/flex-falcon/tree/62a28e30
Diff: http://git-wip-us.apache.org/repos/asf/flex-falcon/diff/62a28e30

Branch: refs/heads/develop
Commit: 62a28e303406b10bae7e1cd7315f1bce2024b79c
Parents: b25d619
Author: Alex Harui <aharui@apache.org>
Authored: Mon Sep 16 10:59:29 2013 -0700
Committer: Alex Harui <aharui@apache.org>
Committed: Tue Sep 17 12:04:37 2013 -0700

----------------------------------------------------------------------
 .../internal/as/codegen/ClassDirectiveProcessor.java    | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/62a28e30/compiler/src/org/apache/flex/compiler/internal/as/codegen/ClassDirectiveProcessor.java
----------------------------------------------------------------------
diff --git a/compiler/src/org/apache/flex/compiler/internal/as/codegen/ClassDirectiveProcessor.java
b/compiler/src/org/apache/flex/compiler/internal/as/codegen/ClassDirectiveProcessor.java
index db1a7ef..dae7ebc 100644
--- a/compiler/src/org/apache/flex/compiler/internal/as/codegen/ClassDirectiveProcessor.java
+++ b/compiler/src/org/apache/flex/compiler/internal/as/codegen/ClassDirectiveProcessor.java
@@ -679,7 +679,7 @@ class ClassDirectiveProcessor extends DirectiveProcessor
                 
                 if ( func.hasModifier(ASModifier.FINAL))
                     tv.visitAttribute(Trait.TRAIT_FINAL, Boolean.TRUE);
-                if ( func.hasModifier(ASModifier.OVERRIDE))
+                if ( func.hasModifier(ASModifier.OVERRIDE) || funcDef.isOverride())
                     tv.visitAttribute(Trait.TRAIT_OVERRIDE, Boolean.TRUE);
                 tv.visitEnd();
             }
@@ -774,8 +774,14 @@ class ClassDirectiveProcessor extends DirectiveProcessor
             }
             else if( override != null)
             {
-                // found overriden function, but function not marked as override
-                problems.add(new FunctionNotMarkedOverrideProblem(node.getNameExpressionNode()));
+                if (func.getBaseName().equals("toString") &&
+                        classDefinition.getContainedScope().hasAnyBindableDefinitions())
+                    func.setOverride();
+                else
+                {
+                    // found overriden function, but function not marked as override
+                    problems.add(new FunctionNotMarkedOverrideProblem(node.getNameExpressionNode()));
+                }
             }
         }
     }


Mime
View raw message