flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gregd...@apache.org
Subject [2/6] git commit: [flex-falcon] [refs/heads/develop] - [IMPROVEMENT] When the constructor is implicit, report the problem against the originating class, otherwise the error is not helpful.
Date Tue, 27 Sep 2016 06:29:14 GMT
[IMPROVEMENT] When the constructor is implicit, report the problem against the originating
class, otherwise the error is not helpful.


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

Branch: refs/heads/develop
Commit: 272470b8beb6194a478ecb7abf2a337b99ee4ddb
Parents: e265f96
Author: greg-dove <greg.dove@gmail.com>
Authored: Mon Sep 26 18:55:16 2016 +1300
Committer: greg-dove <greg.dove@gmail.com>
Committed: Tue Sep 27 11:14:14 2016 +1300

----------------------------------------------------------------------
 .../internal/semantics/MethodBodySemanticChecker.java         | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/272470b8/compiler/src/main/java/org/apache/flex/compiler/internal/semantics/MethodBodySemanticChecker.java
----------------------------------------------------------------------
diff --git a/compiler/src/main/java/org/apache/flex/compiler/internal/semantics/MethodBodySemanticChecker.java
b/compiler/src/main/java/org/apache/flex/compiler/internal/semantics/MethodBodySemanticChecker.java
index 4149e56..1b51727 100644
--- a/compiler/src/main/java/org/apache/flex/compiler/internal/semantics/MethodBodySemanticChecker.java
+++ b/compiler/src/main/java/org/apache/flex/compiler/internal/semantics/MethodBodySemanticChecker.java
@@ -634,7 +634,12 @@ public class MethodBodySemanticChecker
 
                         if ( !first_param.hasDefaultValue() && ! first_param.isRest()
)
                         {
-                            addProblem(new NoDefaultConstructorInBaseClassProblem(iNode,
super_def.getBaseName()));
+                            if ( enclosing_class.getDefinition().getConstructor().isImplicit())
{
+                                //in this case the Error reporting site should point to the
class node,
+                                //because there is no 'real' constructor node to reference
in the source code
+                                addProblem(new NoDefaultConstructorInBaseClassProblem(enclosing_class,
super_def.getBaseName()));
+                            }
+                            else addProblem(new NoDefaultConstructorInBaseClassProblem(iNode,
super_def.getBaseName()));
                         }
                     }
                 }


Mime
View raw message