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

Add `FindBinding` which finds binding #146

Merged
merged 3 commits into from Feb 26, 2020
Merged

Add `FindBinding` which finds binding #146

merged 3 commits into from Feb 26, 2020

Conversation

@ice1000
Copy link
Collaborator

ice1000 commented Feb 22, 2020

Once this is merged, intellij-arend won't compile unless JetBrains/intellij-arend#119 is merged too.

@ice1000 ice1000 requested a review from valis Feb 22, 2020
@ice1000 ice1000 self-assigned this Feb 22, 2020
@ice1000 ice1000 closed this Feb 22, 2020
@ice1000 ice1000 deleted the 100 branch Feb 22, 2020
@ice1000 ice1000 reopened this Feb 22, 2020
@ice1000 ice1000 added the subexpr label Feb 22, 2020
@ice1000 ice1000 mentioned this pull request Feb 22, 2020
Copy link
Collaborator

valis left a comment

Casts in FindBinding may produce NPE. If a cast fails, the whole function should fail.

@ice1000

This comment has been minimized.

Copy link
Collaborator Author

ice1000 commented Feb 26, 2020

Wait, where do you think may cause npe? The the .apply functions are iterations through the bindings, and I return the last binding found because latter binding can shadow prior ones. By implementing the iteration, I'll need to return null when cast fails because there's no more bindings to be iterated. I found this implementation natural, do you have a better idea?

@valis
valis approved these changes Feb 26, 2020
@valis valis merged commit 6631793 into master Feb 26, 2020
Copy link
Collaborator Author

ice1000 left a comment

finished review test

@ice1000 ice1000 added this to the 1.3 milestone Mar 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.