Can not resolve config constant / Access of undefined property
See original GitHub issueHi! I finally got project alive and working in VS Code. Yay! Thank you for the all hard work! This is extension is really cool!
The last problem I have is with compiler definitions. When I define them like this:
"define":
[
{
"name": "CONFIG::funcName",
"value": "'functionName'"
}
]
Then I receive the Can not resolve config constant 'funcName'
error when I use CONFIG::funcName in the code. My code looks like someClass.someMethod( CONFIG::funcName )
.
When I define it as
"additionalOptions": "-define=CONFIG::funcName,'functionName'"
I receive a lot of crashes like
at org.apache.royale.compiler.internal.definitions.AmbiguousDefinition.resolveAmbiguities(AmbiguousDefinition.java:130)
at org.apache.royale.compiler.internal.scopes.ASScopeCache.findProperty(ASScopeCache.java:167)
at org.apache.royale.compiler.internal.scopes.ASScope.findProperty(ASScope.java:1428)
at org.apache.royale.compiler.internal.definitions.references.LexicalReference.resolve(LexicalReference.java:72)
at org.apache.royale.compiler.internal.definitions.DefinitionBase.resolveType(DefinitionBase.java:1062)
at org.apache.royale.compiler.internal.definitions.DefinitionBase.resolveType(DefinitionBase.java:1102)
at org.apache.royale.compiler.internal.definitions.DefinitionBase.resolveType(DefinitionBase.java:884)
at org.apache.royale.compiler.internal.definitions.AmbiguousDefinition.resolveAmbiguousVariableDefinitions(AmbiguousDefinition.java:208)
and then Access of possibly undefined property 'CONFIG'
error.
What do you think can be the source of these problems?
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Access of undefined property CONFIG:: - Stack Overflow
The error: "Access of undefined property LOGGING." ... To be honest I am a ActionScript noob, so I am not sure what to...
Read more >undefined - JavaScript - MDN Web Docs - Mozilla
The global undefined property represents the primitive value undefined. It is one of JavaScript's primitive types.
Read more >Avoiding those dang cannot read property of undefined errors
Uncaught TypeError : Cannot read property 'foo' of undefined. The dreaded error we all hit at some point in JavaScript development.
Read more >Uncaught TypeError: Cannot read property of undefined
If you get undefined error, you need to make sure that which ever variables throws undefined error, is assigned a value to it....
Read more >Constants - Manual - PHP
As the name suggests, that value cannot change during the execution of the ... So yeah, undefined global constant when accessed directly will...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I added an additional check to prevent the crash, if something similar pops up in the future. I also fixed the bug that caused the crash when parsing
additionalOptions
. These fixes will be in the next update.Thank you very much! Seems to be working fine now!