Comments (4)
I can't tell from your sample what the issue is. However, it's correct that there are two variables created. Test:
class A { static m(){ return A; } }; let foo = A; A = 0; foo.m(); // prints the class, not 0
from shift-java.
@bakkot I see. The issue seems to be that ScopeLookup can only provide one Variable
per BindingIdentifier
within . We could either merge ClassName
and ClassDeclaration
, as both function and block scoped, or do a breaking change to allow multiple variables to be returned by findVariableDeclaredBy
, or add a new method to allow returning multiple.
from shift-java.
add a new method to allow returning multiple
I think we already have such a method.
from shift-java.
@bakkot Works for me.
from shift-java.
Related Issues (20)
- Var/let redeclaration early error not fired HOT 1
- Move generated sources to appropriate directory HOT 1
- Yield is a reserved keyword in generator functions
- ScopeAnalysis does not properly handle namespace imports
- CodeGen does not string escape "default" keyword in static property names. HOT 2
- Legacy non-octal escape sequence in strict mode
- Contextual Keyword Escapes HOT 1
- Invalid codegen output for LiteralNumericExpressions > 2^63.
- Failure to parse AwaitExpression within Expression
- Fix let identifiers in for-of statements HOT 1
- Gradle support for es2018? HOT 2
- How do I search for a node in AST in Java? HOT 1
- Add source offsets HOT 1
- scope analyzer: B.3.3 function declarations do not contribute appropriate references
- Incorrect codegen output for ForOfStatement with BinaryExpression. HOT 1
- lenses: support setting
- Thunked class does not use second type parameter
- Handling Optional Chaining operator HOT 1
- support for latest ECMASCRIPT features
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from shift-java.