Fix #9505 Constructors in assertTrue (Scala 3) #9786
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix #9505
This PR fixes a bug in assertTrue macro that did not allow using class constructors (in lhs) inside of it.
The problem was that this macro seemed to be originally written in Scala 2 and the
MethodCallextractor object does not extact constructors. However, in Scala 3 it does. I have added a guard usingisClassConstructoron Select symbol which does not allow future "decomposing" of the tree.Sorry, if what I have described is not understandable, I do not have much experience in contributing to such big projects, so do not hesitate to ask questions. I will try my best to answer them.