Skip to content
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

Merged
merged 15 commits into from
Jun 29, 2015
Merged

Unknown semantics #320

merged 15 commits into from
Jun 29, 2015

Conversation

soywiz
Copy link
Contributor

@soywiz soywiz commented Jun 25, 2015

Fixes "Unknown" semantics #317

soywiz added 13 commits June 24, 2015 14:57
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
return HaxeTypeResolver.getFieldOrMethodReturnType((AbstractHaxeNamedComponent)this.getPsi(), resolver);
}

public SpecificFunctionReference getFunctionType(@Nullable HaxeGenericResolver resolver) {
Copy link
Contributor

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.

Copy link
Contributor Author

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.

@EBatTiVo
Copy link
Contributor

@soywiz OK. I'm done reviewing for now. Awaiting your response.

@soywiz
Copy link
Contributor Author

soywiz commented Jun 25, 2015

Ok. I have read all your comments and suggestions. Tomorrow with some more time I will make a commit with fixes.

EBatTiVo added a commit that referenced this pull request Jun 29, 2015
Semantic Annotator: Handle types that are initially "Unknown."
@EBatTiVo EBatTiVo merged commit 819e1ab into HaxeFoundation:master Jun 29, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants