You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by ah...@apache.org on 2015/11/13 21:03:19 UTC
[1/3] git commit: [flex-falcon] [refs/heads/develop] - try to force
an undefined member error. With this change you get that,
plus a duplicate error claiming the missing property is missing on the class
def instead of the missing member's supposed insta
Repository: flex-falcon
Updated Branches:
refs/heads/develop 6b74cd0eb -> 63ffe0fc8
try to force an undefined member error. With this change you get that, plus a duplicate error claiming the missing property is missing on the class def instead of the missing member's supposed instance.
Project: http://git-wip-us.apache.org/repos/asf/flex-falcon/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-falcon/commit/9f24eba6
Tree: http://git-wip-us.apache.org/repos/asf/flex-falcon/tree/9f24eba6
Diff: http://git-wip-us.apache.org/repos/asf/flex-falcon/diff/9f24eba6
Branch: refs/heads/develop
Commit: 9f24eba694d3a8b1316525bf7b6275269e6fbd17
Parents: 6b74cd0
Author: Alex Harui <ah...@apache.org>
Authored: Fri Nov 13 10:51:22 2015 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Fri Nov 13 10:51:22 2015 -0800
----------------------------------------------------------------------
.../internal/tree/as/IdentifierNode.java | 22 ++++++++++++++++++++
1 file changed, 22 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/9f24eba6/compiler/src/org/apache/flex/compiler/internal/tree/as/IdentifierNode.java
----------------------------------------------------------------------
diff --git a/compiler/src/org/apache/flex/compiler/internal/tree/as/IdentifierNode.java b/compiler/src/org/apache/flex/compiler/internal/tree/as/IdentifierNode.java
index 2b153fb..95ab0c3 100644
--- a/compiler/src/org/apache/flex/compiler/internal/tree/as/IdentifierNode.java
+++ b/compiler/src/org/apache/flex/compiler/internal/tree/as/IdentifierNode.java
@@ -60,6 +60,7 @@ import org.apache.flex.compiler.internal.tree.as.metadata.MetaTagsNode;
import org.apache.flex.compiler.internal.tree.as.metadata.StyleTagNode;
import org.apache.flex.compiler.internal.workspaces.Workspace;
import org.apache.flex.compiler.parsing.IASToken;
+import org.apache.flex.compiler.problems.AccessUndefinedMemberProblem;
import org.apache.flex.compiler.problems.ICompilerProblem;
import org.apache.flex.compiler.projects.ICompilerProject;
import org.apache.flex.compiler.tree.ASTNodeID;
@@ -447,6 +448,27 @@ public class IdentifierNode extends ExpressionNodeBase implements IIdentifierNod
if (canEarlyBind(project, def))
return ((DefinitionBase)def).getMName(project);
+ if (def == null)
+ {
+ // no def? see if this is dynamic
+ // or a missing member on a known and non-dynamic def
+ if (getParent().getNodeID() == ASTNodeID.MemberAccessExpressionID)
+ {
+ // ok it is a member expression, are we on the right?
+ MemberAccessExpressionNode mae = (MemberAccessExpressionNode) getParent();
+ if (mae.getRightOperandNode() == this)
+ {
+ // we're on the right, what is the left?
+ ITypeDefinition leftDef = mae.getLeftOperandNode().resolveType(project);
+ if (leftDef != null && leftDef.isDynamic() == false)
+ {
+ AccessUndefinedMemberProblem aump = new AccessUndefinedMemberProblem(this, getName(), leftDef.getQualifiedName());
+ project.getProblems().add(aump);
+ return null;
+ }
+ }
+ }
+ }
ASScope scope = getASScope();
if (isQualifiedRef())
[2/3] git commit: [flex-falcon] [refs/heads/develop] - redo undefined
member error reporting
Posted by ah...@apache.org.
redo undefined member error reporting
Project: http://git-wip-us.apache.org/repos/asf/flex-falcon/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-falcon/commit/b7f382d9
Tree: http://git-wip-us.apache.org/repos/asf/flex-falcon/tree/b7f382d9
Diff: http://git-wip-us.apache.org/repos/asf/flex-falcon/diff/b7f382d9
Branch: refs/heads/develop
Commit: b7f382d903fa488d5dc80a5871fcc887082a78c5
Parents: 9f24eba
Author: Alex Harui <ah...@apache.org>
Authored: Fri Nov 13 11:56:10 2015 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Fri Nov 13 11:56:10 2015 -0800
----------------------------------------------------------------------
.../semantics/MethodBodySemanticChecker.java | 21 ++++++++++++++++++++
.../internal/tree/as/IdentifierNode.java | 7 ++++---
2 files changed, 25 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/b7f382d9/compiler/src/org/apache/flex/compiler/internal/semantics/MethodBodySemanticChecker.java
----------------------------------------------------------------------
diff --git a/compiler/src/org/apache/flex/compiler/internal/semantics/MethodBodySemanticChecker.java b/compiler/src/org/apache/flex/compiler/internal/semantics/MethodBodySemanticChecker.java
index ba31e09..67a934b 100644
--- a/compiler/src/org/apache/flex/compiler/internal/semantics/MethodBodySemanticChecker.java
+++ b/compiler/src/org/apache/flex/compiler/internal/semantics/MethodBodySemanticChecker.java
@@ -1685,6 +1685,8 @@ public class MethodBodySemanticChecker
*/
private ICompilerProblem accessUndefinedProperty(Binding b, IASNode iNode)
{
+ ICompilerProblem problem;
+
String unknown_name = null;
if ( b.getName() != null )
@@ -1707,6 +1709,10 @@ public class MethodBodySemanticChecker
);
}
}
+ else if ((problem = isMissingMember(b.getNode())) != null)
+ {
+ return problem;
+ }
else if ( utils.isInInstanceFunction(iNode) && utils.isInaccessible((ASScope)utils.getEnclosingFunctionDefinition(iNode).getContainingScope(), b) )
{
return new InaccessiblePropertyReferenceProblem(
@@ -1719,6 +1725,21 @@ public class MethodBodySemanticChecker
return new AccessUndefinedPropertyProblem(iNode, unknown_name);
}
+ public ICompilerProblem isMissingMember(IASNode iNode)
+ {
+ if (iNode instanceof IdentifierNode && iNode.getParent() instanceof MemberAccessExpressionNode)
+ {
+ MemberAccessExpressionNode mae = (MemberAccessExpressionNode)(iNode.getParent());
+ if (iNode == mae.getRightOperandNode())
+ {
+ ITypeDefinition leftDef = mae.getLeftOperandNode().resolveType(project);
+ if (!leftDef.isDynamic())
+ return new AccessUndefinedMemberProblem(iNode, ((IdentifierNode)iNode).getName(), leftDef.getQualifiedName());
+ }
+ }
+ return null;
+ }
+
/**
* Ensure a super-qualified access is in an instance method.
*/
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/b7f382d9/compiler/src/org/apache/flex/compiler/internal/tree/as/IdentifierNode.java
----------------------------------------------------------------------
diff --git a/compiler/src/org/apache/flex/compiler/internal/tree/as/IdentifierNode.java b/compiler/src/org/apache/flex/compiler/internal/tree/as/IdentifierNode.java
index 95ab0c3..c47a48a 100644
--- a/compiler/src/org/apache/flex/compiler/internal/tree/as/IdentifierNode.java
+++ b/compiler/src/org/apache/flex/compiler/internal/tree/as/IdentifierNode.java
@@ -462,9 +462,10 @@ public class IdentifierNode extends ExpressionNodeBase implements IIdentifierNod
ITypeDefinition leftDef = mae.getLeftOperandNode().resolveType(project);
if (leftDef != null && leftDef.isDynamic() == false)
{
- AccessUndefinedMemberProblem aump = new AccessUndefinedMemberProblem(this, getName(), leftDef.getQualifiedName());
- project.getProblems().add(aump);
- return null;
+ INamespaceReference nr = leftDef.getNamespaceReference();
+ INamespaceDefinition nd = nr.resolveNamespaceReference(project);
+ Set<INamespaceDefinition> nsset = ImmutableSet.of((INamespaceDefinition)nd);
+ return makeName(nsset, getName(), isAttributeIdentifier());
}
}
}
[3/3] git commit: [flex-falcon] [refs/heads/develop] - timeout seems
to be missing on XHR
Posted by ah...@apache.org.
timeout seems to be missing on XHR
Project: http://git-wip-us.apache.org/repos/asf/flex-falcon/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-falcon/commit/63ffe0fc
Tree: http://git-wip-us.apache.org/repos/asf/flex-falcon/tree/63ffe0fc
Diff: http://git-wip-us.apache.org/repos/asf/flex-falcon/diff/63ffe0fc
Branch: refs/heads/develop
Commit: 63ffe0fc88b45943051bc4d8aeecd53cbffec582
Parents: b7f382d
Author: Alex Harui <ah...@apache.org>
Authored: Fri Nov 13 12:03:04 2015 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Fri Nov 13 12:03:04 2015 -0800
----------------------------------------------------------------------
externs/js/missing.js | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/63ffe0fc/externs/js/missing.js
----------------------------------------------------------------------
diff --git a/externs/js/missing.js b/externs/js/missing.js
index cb1d8e7..274a6f5 100644
--- a/externs/js/missing.js
+++ b/externs/js/missing.js
@@ -132,4 +132,9 @@ function History() {}
/**
* @constructor
*/
-function Location() {}
\ No newline at end of file
+function Location() {}
+
+/**
+ * @type {number}
+ */
+XMLHttpRequest.prototype.timeout;
\ No newline at end of file