You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by ah...@apache.org on 2019/01/11 06:44:59 UTC
[royale-compiler] branch develop updated (c719da5 -> b8e29d9)
This is an automated email from the ASF dual-hosted git repository.
aharui pushed a change to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-compiler.git.
from c719da5 fix deps issue. make sure ther e isn't a circularity
new 87c44bc if we can't find a definition, report an error. We got here when window.Event was used without importing it
new ffead0a try to resolve types more intelligently in order to allow top-level conversion functions with the same name as an interface. For example, the browser MouseEvent takes a MouseEventInit interface, but we want a conversion function called MouseEventInit so it looks and behaves more like XML's conversion function. It appears that the canEscapeWith flag can be used to choose the function over the interface definition
new 6f487d3 don't warn on internal vars
new 787b263 don't warn on internal classes. This assumes internal classes are not serialized or accessed with brackets
new 7b21774 block Object.toJSON. Doesn't seem to be in the ES5 spec. Fixes apache/royale-asjs#367.
new 77e31e2 only warn on truly public vars, not mx_internal or _internal
new 79b92c4 some source like typedefs from google used 'returns'
new 7a65fbb the parent isn't always a class and we only need to decorate the name if it is a class
new 84ff0da ignore other asdoc tags we find. We should make this list configurable someday
new b8e29d9 remove linefeeds so they don't result in string continuation warnings
The 10 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.../codegen/typedefs/reference/ClassReference.java | 5 +++++
.../internal/codegen/js/jx/IdentifierEmitter.java | 5 +++--
.../internal/codegen/js/jx/LiteralEmitter.java | 1 +
.../codegen/js/royale/JSRoyaleDocEmitter.java | 4 +++-
.../compiler/utils/JSClosureCompilerWrapper.java | 4 ++--
.../internal/definitions/AmbiguousDefinition.java | 23 +++++++++++++++++++++-
.../references/ResolvedQualifiersReference.java | 2 +-
.../royale/compiler/internal/scopes/ASScope.java | 4 ++--
.../compiler/internal/scopes/ASScopeCache.java | 12 ++++++-----
.../semantics/MethodBodySemanticChecker.java | 4 ++++
10 files changed, 50 insertions(+), 14 deletions(-)
[royale-compiler] 06/10: only warn on truly public vars,
not mx_internal or _internal
Posted by ah...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
aharui pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-compiler.git
commit 77e31e2bf540ea7e8ae5ed87e90e654ffe72367f
Author: Alex Harui <ah...@apache.org>
AuthorDate: Wed Jan 9 17:20:13 2019 -0800
only warn on truly public vars, not mx_internal or _internal
---
.../royale/compiler/internal/codegen/js/royale/JSRoyaleDocEmitter.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/royale/JSRoyaleDocEmitter.java b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/royale/JSRoyaleDocEmitter.java
index b26dcff..526056a 100644
--- a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/royale/JSRoyaleDocEmitter.java
+++ b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/royale/JSRoyaleDocEmitter.java
@@ -436,7 +436,7 @@ public class JSRoyaleDocEmitter extends JSGoogDocEmitter
if (tag != null)
bindable = true;
}
- if (warnPublicVars && !node.isConst() && !bindable && !ns.contentEquals("internal"))
+ if (warnPublicVars && !node.isConst() && !bindable && ns.contentEquals("public"))
{
if (!suppressedWarning(node, fjp))
fjp.getProblems().add(new PublicVarWarningProblem(node));
[royale-compiler] 05/10: block Object.toJSON. Doesn't seem to be in
the ES5 spec. Fixes apache/royale-asjs#367.
Posted by ah...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
aharui pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-compiler.git
commit 7b2177433bd9bb111694838b8f9dbb9303610089
Author: Alex Harui <ah...@apache.org>
AuthorDate: Wed Jan 9 17:17:18 2019 -0800
block Object.toJSON. Doesn't seem to be in the ES5 spec. Fixes apache/royale-asjs#367.
---
.../compiler/internal/codegen/typedefs/reference/ClassReference.java | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/compiler-externc/src/main/java/org/apache/royale/compiler/internal/codegen/typedefs/reference/ClassReference.java b/compiler-externc/src/main/java/org/apache/royale/compiler/internal/codegen/typedefs/reference/ClassReference.java
index b766fc1..d32cde3 100644
--- a/compiler-externc/src/main/java/org/apache/royale/compiler/internal/codegen/typedefs/reference/ClassReference.java
+++ b/compiler-externc/src/main/java/org/apache/royale/compiler/internal/codegen/typedefs/reference/ClassReference.java
@@ -644,6 +644,11 @@ public class ClassReference extends BaseReference
{
// skipping Object.prototype.toString() allows toString(opt_radix) for Number, int and uint
}
+ else if (getQualifiedName().equals("Object") && functionName.equals("toJSON"))
+ {
+ // skipping Object.prototype.toJSON(). Doesn't seem to be in the spec and excluding
+ // in the config seems to also block Date.toJSON
+ }
else
{
instanceMethods.put(functionName, method);
[royale-compiler] 04/10: don't warn on internal classes. This
assumes internal classes are not serialized or accessed with brackets
Posted by ah...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
aharui pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-compiler.git
commit 787b263fed8feab904407753cf2daaa93a76514b
Author: Alex Harui <ah...@apache.org>
AuthorDate: Tue Jan 8 10:12:56 2019 -0800
don't warn on internal classes. This assumes internal classes are not serialized or accessed with brackets
---
.../royale/compiler/internal/codegen/js/royale/JSRoyaleDocEmitter.java | 2 ++
1 file changed, 2 insertions(+)
diff --git a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/royale/JSRoyaleDocEmitter.java b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/royale/JSRoyaleDocEmitter.java
index d6a957f..b26dcff 100644
--- a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/royale/JSRoyaleDocEmitter.java
+++ b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/royale/JSRoyaleDocEmitter.java
@@ -490,6 +490,8 @@ public class JSRoyaleDocEmitter extends JSGoogDocEmitter
IClassDefinition cdef = ((IClassNode)classNode).getDefinition();
if (cdef.isBindable())
return true;
+ if (!cdef.isPublic())
+ return true;
}
return false;
}
[royale-compiler] 03/10: don't warn on internal vars
Posted by ah...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
aharui pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-compiler.git
commit 6f487d3b53093b5857e9d076a5b4af99b454069c
Author: Alex Harui <ah...@apache.org>
AuthorDate: Tue Jan 8 09:58:48 2019 -0800
don't warn on internal vars
---
.../royale/compiler/internal/codegen/js/royale/JSRoyaleDocEmitter.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/royale/JSRoyaleDocEmitter.java b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/royale/JSRoyaleDocEmitter.java
index 02c5eca..d6a957f 100644
--- a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/royale/JSRoyaleDocEmitter.java
+++ b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/royale/JSRoyaleDocEmitter.java
@@ -436,7 +436,7 @@ public class JSRoyaleDocEmitter extends JSGoogDocEmitter
if (tag != null)
bindable = true;
}
- if (warnPublicVars && !node.isConst() && !bindable)
+ if (warnPublicVars && !node.isConst() && !bindable && !ns.contentEquals("internal"))
{
if (!suppressedWarning(node, fjp))
fjp.getProblems().add(new PublicVarWarningProblem(node));
[royale-compiler] 09/10: ignore other asdoc tags we find. We should
make this list configurable someday
Posted by ah...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
aharui pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-compiler.git
commit 84ff0daf7dd03d35f7b727c93fa406cdc320f8b6
Author: Alex Harui <ah...@apache.org>
AuthorDate: Thu Jan 10 22:42:49 2019 -0800
ignore other asdoc tags we find. We should make this list configurable someday
---
.../java/org/apache/royale/compiler/utils/JSClosureCompilerWrapper.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/compiler-jx/src/main/java/org/apache/royale/compiler/utils/JSClosureCompilerWrapper.java b/compiler-jx/src/main/java/org/apache/royale/compiler/utils/JSClosureCompilerWrapper.java
index 1bec6de..7661d38 100644
--- a/compiler-jx/src/main/java/org/apache/royale/compiler/utils/JSClosureCompilerWrapper.java
+++ b/compiler-jx/src/main/java/org/apache/royale/compiler/utils/JSClosureCompilerWrapper.java
@@ -422,7 +422,7 @@ public class JSClosureCompilerWrapper
WarningLevel.VERBOSE.setOptionsForWarningLevel(options_);
String[] asdocTags = new String[] {"productversion",
- "playerversion", "langversion", "copy",
+ "playerversion", "langversion", "copy", "span", "para", "throw", "tiptext",
"asparam", "asreturn", "asreturns", "asprivate",
"royaleignoreimport", "royaleignorecoercion", "royaleemitcoercion",
"royalenoimplicitstringconversion","royaledebug"};
[royale-compiler] 08/10: the parent isn't always a class and we
only need to decorate the name if it is a class
Posted by ah...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
aharui pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-compiler.git
commit 7a65fbb0f5484e3ddff144955c5b0431c6714591
Author: Alex Harui <ah...@apache.org>
AuthorDate: Thu Jan 10 22:11:09 2019 -0800
the parent isn't always a class and we only need to decorate the name if it is a class
---
.../royale/compiler/internal/codegen/js/jx/IdentifierEmitter.java | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/jx/IdentifierEmitter.java b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/jx/IdentifierEmitter.java
index b7dbe46..26d8649 100644
--- a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/jx/IdentifierEmitter.java
+++ b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/jx/IdentifierEmitter.java
@@ -36,6 +36,7 @@ import org.apache.royale.compiler.internal.codegen.js.royale.JSRoyaleEmitter;
import org.apache.royale.compiler.internal.codegen.js.goog.JSGoogEmitterTokens;
import org.apache.royale.compiler.internal.codegen.js.utils.EmitterUtils;
import org.apache.royale.compiler.internal.definitions.AccessorDefinition;
+import org.apache.royale.compiler.internal.definitions.ClassDefinition;
import org.apache.royale.compiler.internal.definitions.FunctionDefinition;
import org.apache.royale.compiler.internal.definitions.TypeDefinitionBase;
import org.apache.royale.compiler.internal.tree.as.NonResolvingIdentifierNode;
@@ -319,7 +320,7 @@ public class IdentifierEmitter extends JSSubEmitter implements
else
{
qname = node.getName();
- if (nodeDef != null && !isStatic && (!(nodeDef instanceof IParameterDefinition)) && nodeDef.isPrivate() && getProject().getAllowPrivateNameConflicts())
+ if (nodeDef != null && !isStatic && (nodeDef.getParent() instanceof ClassDefinition) && (!(nodeDef instanceof IParameterDefinition)) && nodeDef.isPrivate() && getProject().getAllowPrivateNameConflicts())
qname = getEmitter().formatPrivateName(nodeDef.getParent().getQualifiedName(), qname);
write(qname);
}
@@ -339,7 +340,7 @@ public class IdentifierEmitter extends JSSubEmitter implements
}
else
{
- if (nodeDef != null && !isStatic && (!(nodeDef instanceof IParameterDefinition)) && nodeDef.isPrivate() && getProject().getAllowPrivateNameConflicts())
+ if (nodeDef != null && !isStatic && (nodeDef.getParent() instanceof ClassDefinition) && (!(nodeDef instanceof IParameterDefinition)) && nodeDef.isPrivate() && getProject().getAllowPrivateNameConflicts())
qname = getEmitter().formatPrivateName(nodeDef.getParent().getQualifiedName(), qname);
write(qname);
}
[royale-compiler] 10/10: remove linefeeds so they don't result in
string continuation warnings
Posted by ah...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
aharui pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-compiler.git
commit b8e29d9a16211f61417f85edc7d36abc9cd09f94
Author: Alex Harui <ah...@apache.org>
AuthorDate: Thu Jan 10 22:44:18 2019 -0800
remove linefeeds so they don't result in string continuation warnings
---
.../apache/royale/compiler/internal/codegen/js/jx/LiteralEmitter.java | 1 +
1 file changed, 1 insertion(+)
diff --git a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/jx/LiteralEmitter.java b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/jx/LiteralEmitter.java
index 6c79341..939f498 100644
--- a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/jx/LiteralEmitter.java
+++ b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/jx/LiteralEmitter.java
@@ -107,6 +107,7 @@ public class LiteralEmitter extends JSSubEmitter implements
if (child instanceof LiteralNode)
{
s = ((LiteralNode)child).getValue(true);
+ s = s.replace("\n", "");
if (s.contains("'"))
sb.append("\"" + s + "\"");
else
[royale-compiler] 02/10: try to resolve types more intelligently in
order to allow top-level conversion functions with the same name as an
interface. For example,
the browser MouseEvent takes a MouseEventInit interface,
but we want a conversion function called MouseEventInit so it looks and
behaves more like XML's conversion function. It appears that the
canEscapeWith flag can be used to choose the function over the interface
definition
Posted by ah...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
aharui pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-compiler.git
commit ffead0a8ead70d4294ee3ce1da92e5a69a167590
Author: Alex Harui <ah...@apache.org>
AuthorDate: Mon Jan 7 22:20:57 2019 -0800
try to resolve types more intelligently in order to allow top-level conversion functions with the same name as an interface. For example, the browser MouseEvent takes a MouseEventInit interface, but we want a conversion function called MouseEventInit so it looks and behaves more like XML's conversion function. It appears that the canEscapeWith flag can be used to choose the function over the interface definition
---
.../internal/definitions/AmbiguousDefinition.java | 23 +++++++++++++++++++++-
.../references/ResolvedQualifiersReference.java | 2 +-
.../royale/compiler/internal/scopes/ASScope.java | 4 ++--
.../compiler/internal/scopes/ASScopeCache.java | 12 ++++++-----
4 files changed, 32 insertions(+), 9 deletions(-)
diff --git a/compiler/src/main/java/org/apache/royale/compiler/internal/definitions/AmbiguousDefinition.java b/compiler/src/main/java/org/apache/royale/compiler/internal/definitions/AmbiguousDefinition.java
index b51b8c5..91e0d5e 100644
--- a/compiler/src/main/java/org/apache/royale/compiler/internal/definitions/AmbiguousDefinition.java
+++ b/compiler/src/main/java/org/apache/royale/compiler/internal/definitions/AmbiguousDefinition.java
@@ -95,10 +95,11 @@ public final class AmbiguousDefinition extends DefinitionBase implements IDefini
*
* @param project The Project to use to resolve things
* @param defs an Array of definitions to compare
+ * @param favorTypes
* @return the definition to use as the result of the lookup, if the
* ambiguity was successfully resolved, otherwise null
*/
- public static IDefinition resolveAmbiguities(ICompilerProject project, List<IDefinition> defs)
+ public static IDefinition resolveAmbiguities(ICompilerProject project, List<IDefinition> defs, boolean favorTypes)
{
IDefinition resolvedDef = null;
@@ -111,6 +112,26 @@ public final class AmbiguousDefinition extends DefinitionBase implements IDefini
resolvedDef = defs.get(0);
}
+ // this is used to favor type definitions over function definitions
+ // when resolving the type of a variable (which can't be a function)
+ if (resolvedDef == null && defs.size() == 2)
+ {
+ IDefinition def0 = defs.get(0);
+ IDefinition def1 = defs.get(1);
+ if (def0 instanceof FunctionDefinition &&
+ (def1 instanceof ClassDefinition ||
+ (def1 instanceof InterfaceDefinition)))
+ {
+ resolvedDef = favorTypes ? def1 : def0;
+ }
+ else if (def1 instanceof FunctionDefinition &&
+ (def0 instanceof ClassDefinition ||
+ (def0 instanceof InterfaceDefinition)))
+ {
+ resolvedDef = favorTypes ? def0 : def1;
+ }
+ }
+
if (resolvedDef == null)
{
// check for redeclared variables and functions
diff --git a/compiler/src/main/java/org/apache/royale/compiler/internal/definitions/references/ResolvedQualifiersReference.java b/compiler/src/main/java/org/apache/royale/compiler/internal/definitions/references/ResolvedQualifiersReference.java
index 1561d13..bf2ac97 100644
--- a/compiler/src/main/java/org/apache/royale/compiler/internal/definitions/references/ResolvedQualifiersReference.java
+++ b/compiler/src/main/java/org/apache/royale/compiler/internal/definitions/references/ResolvedQualifiersReference.java
@@ -128,7 +128,7 @@ public class ResolvedQualifiersReference implements IResolvedQualifiersReference
}
default:
{
- IDefinition d = AmbiguousDefinition.resolveAmbiguities(project, defs);
+ IDefinition d = AmbiguousDefinition.resolveAmbiguities(project, defs, false);
if (d == null)
return AmbiguousDefinition.get();
return d;
diff --git a/compiler/src/main/java/org/apache/royale/compiler/internal/scopes/ASScope.java b/compiler/src/main/java/org/apache/royale/compiler/internal/scopes/ASScope.java
index 434a2d9..b229304 100644
--- a/compiler/src/main/java/org/apache/royale/compiler/internal/scopes/ASScope.java
+++ b/compiler/src/main/java/org/apache/royale/compiler/internal/scopes/ASScope.java
@@ -1425,7 +1425,7 @@ public abstract class ASScope extends ASScopeBase
assert baseName.indexOf('.') == -1 : "baseName must not be any sort of qname";
CompilerProject compilerProject = (CompilerProject)project;
ASScopeCache scopeCache = compilerProject.getCacheForScope(this);
- return filterWith(scopeCache.findProperty(baseName, dt), canEscapeWith);
+ return filterWith(scopeCache.findProperty(baseName, dt, canEscapeWith), canEscapeWith);
}
/**
@@ -1487,7 +1487,7 @@ public abstract class ASScope extends ASScopeBase
assert def.isInProject(project);
break;
default:
- IDefinition d = AmbiguousDefinition.resolveAmbiguities(project, defs);
+ IDefinition d = AmbiguousDefinition.resolveAmbiguities(project, defs, false);
if (d != null)
def = d;
else
diff --git a/compiler/src/main/java/org/apache/royale/compiler/internal/scopes/ASScopeCache.java b/compiler/src/main/java/org/apache/royale/compiler/internal/scopes/ASScopeCache.java
index fb43722..7d3563a 100644
--- a/compiler/src/main/java/org/apache/royale/compiler/internal/scopes/ASScopeCache.java
+++ b/compiler/src/main/java/org/apache/royale/compiler/internal/scopes/ASScopeCache.java
@@ -131,7 +131,7 @@ public class ASScopeCache
* @param dt Which type of dependency to introduce when we do the lookup
* @return The IDefinition for the property, or null if it wasn't found
*/
- IDefinition findProperty(String name, DependencyType dt)
+ IDefinition findProperty(String name, DependencyType dt, boolean favorTypes)
{
ConcurrentMap<String, IDefinition> map = getScopeChainMap();
@@ -148,6 +148,7 @@ public class ASScopeCache
// the benefit is that we avoid any sort of locking, which was proving expensive (time wise,
// and memory wise).
+ boolean wasAmbiguous = false;
IDefinition def = null;
Set<INamespaceDefinition> namespaceSet = scope.getNamespaceSetForName(project, name);
// Look for the definition in the scope
@@ -164,7 +165,8 @@ public class ASScopeCache
assert def.isInProject(project);
break;
default:
- IDefinition d = AmbiguousDefinition.resolveAmbiguities(project, defs);
+ wasAmbiguous = true;
+ IDefinition d = AmbiguousDefinition.resolveAmbiguities(project, defs, favorTypes);
if (d != null)
def = d;
else {
@@ -186,7 +188,7 @@ public class ASScopeCache
// If the dependency type is null we can't cache the name
// resolution result, because the name resolution cache will not
// be properly invalidated when the file containing the definition changes.
- if (dt != null)
+ if (dt != null && !wasAmbiguous)
{
result = map.putIfAbsent(name, def);
if (result == null)
@@ -294,7 +296,7 @@ public class ASScopeCache
break;
default:
- IDefinition d = AmbiguousDefinition.resolveAmbiguities(project, defs);
+ IDefinition d = AmbiguousDefinition.resolveAmbiguities(project, defs, false);
if (d != null)
def = d;
else
@@ -361,7 +363,7 @@ public class ASScopeCache
assert def.isInProject(project);
break;
default:
- IDefinition d = AmbiguousDefinition.resolveAmbiguities(project, defs);
+ IDefinition d = AmbiguousDefinition.resolveAmbiguities(project, defs, false);
if (d != null)
def = d;
else
[royale-compiler] 07/10: some source like typedefs from google used
'returns'
Posted by ah...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
aharui pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-compiler.git
commit 79b92c4c35f0c7c48a7e580989ed850f2ed3113b
Author: Alex Harui <ah...@apache.org>
AuthorDate: Wed Jan 9 17:35:32 2019 -0800
some source like typedefs from google used 'returns'
---
.../java/org/apache/royale/compiler/utils/JSClosureCompilerWrapper.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/compiler-jx/src/main/java/org/apache/royale/compiler/utils/JSClosureCompilerWrapper.java b/compiler-jx/src/main/java/org/apache/royale/compiler/utils/JSClosureCompilerWrapper.java
index a08fc49..1bec6de 100644
--- a/compiler-jx/src/main/java/org/apache/royale/compiler/utils/JSClosureCompilerWrapper.java
+++ b/compiler-jx/src/main/java/org/apache/royale/compiler/utils/JSClosureCompilerWrapper.java
@@ -423,7 +423,7 @@ public class JSClosureCompilerWrapper
String[] asdocTags = new String[] {"productversion",
"playerversion", "langversion", "copy",
- "asparam", "asreturn", "asprivate",
+ "asparam", "asreturn", "asreturns", "asprivate",
"royaleignoreimport", "royaleignorecoercion", "royaleemitcoercion",
"royalenoimplicitstringconversion","royaledebug"};
options_.setExtraAnnotationNames(Arrays.asList(asdocTags));
[royale-compiler] 01/10: if we can't find a definition,
report an error. We got here when window.Event was used without
importing it
Posted by ah...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
aharui pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-compiler.git
commit 87c44bc9ca0a7260e45b2def9187f8fa8371792b
Author: Alex Harui <ah...@apache.org>
AuthorDate: Mon Jan 7 22:17:45 2019 -0800
if we can't find a definition, report an error. We got here when window.Event was used without importing it
---
.../royale/compiler/internal/semantics/MethodBodySemanticChecker.java | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/compiler/src/main/java/org/apache/royale/compiler/internal/semantics/MethodBodySemanticChecker.java b/compiler/src/main/java/org/apache/royale/compiler/internal/semantics/MethodBodySemanticChecker.java
index 321c6d3..5b14145 100644
--- a/compiler/src/main/java/org/apache/royale/compiler/internal/semantics/MethodBodySemanticChecker.java
+++ b/compiler/src/main/java/org/apache/royale/compiler/internal/semantics/MethodBodySemanticChecker.java
@@ -2033,6 +2033,10 @@ public class MethodBodySemanticChecker
break;
}
}
+ else if (def == null)
+ {
+ addProblem(new UnresolvedClassReferenceProblem(call_node, func_name.getDisplayString()));
+ }
}
}