-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unknown semantics #320
Unknown semantics #320
Conversation
Created SpecificTypeReferenceHolder in order to be able to mutate results (Unknown), keeping SpecificTypeReference immutable and extendable (normal types + functional types). Handled a new case: var a; a = 10; a = 'test'; // error here! a = 20;
- Renamed SpecificTypeReferenceHolder to ResultHolder - Added canMutate to ResultHolder so you can detect trying to change a inline variable
Added some global fixers
… so types can be resolved
return HaxeTypeResolver.getFieldOrMethodReturnType((AbstractHaxeNamedComponent)this.getPsi(), resolver); | ||
} | ||
|
||
public SpecificFunctionReference getFunctionType(@Nullable HaxeGenericResolver resolver) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small nit. Please keep functions with identical names next to each other. It just makes them easier to scan for. In this case, getReturnType(resolver) should have come before getFunctionType(), and both getFunctionType() methods should be next to one another.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have to review some classes including this one. I have evolved them and there are some inconsistencies out there including wrong naming and some strange stuff.
I'm taking note on this one.
@soywiz OK. I'm done reviewing for now. Awaiting your response. |
Ok. I have read all your comments and suggestions. Tomorrow with some more time I will make a commit with fixes. |
Semantic Annotator: Handle types that are initially "Unknown."
Fixes "Unknown" semantics #317