You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by jo...@apache.org on 2021/01/20 22:19:14 UTC
[royale-compiler] branch develop updated: AppliedVectorDefinition:
error if Vector$double, Vector$int, Vector$uint, or Vector$object is missing
This is an automated email from the ASF dual-hosted git repository.
joshtynjala pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-compiler.git
The following commit(s) were added to refs/heads/develop by this push:
new 72887d2 AppliedVectorDefinition: error if Vector$double, Vector$int, Vector$uint, or Vector$object is missing
72887d2 is described below
commit 72887d2ee46c318b8356baa34ad091eaf0f6148d
Author: Josh Tynjala <jo...@apache.org>
AuthorDate: Wed Jan 20 14:18:05 2021 -0800
AppliedVectorDefinition: error if Vector$double, Vector$int, Vector$uint, or Vector$object is missing
This replaces an ugly stack trace. The error will be produced only if the type is actually needed at compile-time.
---
.../compiler/internal/definitions/AppliedVectorDefinition.java | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/compiler/src/main/java/org/apache/royale/compiler/internal/definitions/AppliedVectorDefinition.java b/compiler/src/main/java/org/apache/royale/compiler/internal/definitions/AppliedVectorDefinition.java
index 7cf995b..eccc2b1 100644
--- a/compiler/src/main/java/org/apache/royale/compiler/internal/definitions/AppliedVectorDefinition.java
+++ b/compiler/src/main/java/org/apache/royale/compiler/internal/definitions/AppliedVectorDefinition.java
@@ -43,6 +43,7 @@ import org.apache.royale.compiler.definitions.metadata.IMetaTag;
import org.apache.royale.compiler.definitions.references.IReference;
import org.apache.royale.compiler.definitions.references.IResolvedQualifiersReference;
import org.apache.royale.compiler.definitions.references.ReferenceFactory;
+import org.apache.royale.compiler.exceptions.MissingBuiltinException;
import org.apache.royale.compiler.internal.projects.CompilerProject;
import org.apache.royale.compiler.internal.scopes.ASScope;
import org.apache.royale.compiler.internal.scopes.FunctionScope;
@@ -603,6 +604,10 @@ public final class AppliedVectorDefinition extends ClassDefinitionBase implement
IResolvedQualifiersReference vectorReference = ReferenceFactory.resolvedQualifierQualifiedReference(project.getWorkspace(), vectorImplPackage, baseName);
IDefinition vectorIDefinition = vectorReference.resolve(project);
+ if(vectorIDefinition == null)
+ {
+ throw new MissingBuiltinException(baseName);
+ }
assert vectorIDefinition instanceof IClassDefinition :
"Unable to find: " + vectorReference.getDisplayString();
return (IClassDefinition) vectorIDefinition;