Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@artembakhanov
Copy link
Contributor

@artembakhanov artembakhanov commented Apr 14, 2025

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 MethodCall extractor object does not extact constructors. However, in Scala 3 it does. I have added a guard using isClassConstructor on 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.

@CLAassistant
Copy link

CLAassistant commented Apr 14, 2025

CLA assistant check
All committers have signed the CLA.

Copy link
Member

@guizmaii guizmaii left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Thanks for your detailed description in the PR. Was helpful :)

@hearnadam hearnadam merged commit 1cd258f into zio:series/2.x Apr 15, 2025
18 checks passed
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.

zio.assertTrue macros works incorrect

4 participants