Skip to content

Refactor: extract ValueClassExtractor/Wrapper macros to scala-2 sources#612

Merged
TimvdLippe merged 1 commit into
mockito:release/2.xfrom
jozic:set-structure-macro-common
Feb 19, 2026
Merged

Refactor: extract ValueClassExtractor/Wrapper macros to scala-2 sources#612
TimvdLippe merged 1 commit into
mockito:release/2.xfrom
jozic:set-structure-macro-common

Conversation

@jozic

@jozic jozic commented Feb 16, 2026

Copy link
Copy Markdown
Contributor

Another baby step toward Scala 3
Move Scala 2 macro implementations from shared ValueClassExtractor and ValueClassWrapper into dedicated scala-2/ source files. The shared files now contain only runtime types and delegate to a Compat trait that provides the implicit macro in Scala 2.

@jozic jozic marked this pull request as ready for review February 16, 2026 21:25

val r =
if (isValueClass) {
c.Expr[ValueClassExtractor[VC]](q"new _root_.org.mockito.internal.ReflectionExtractor[$tpe]")

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

dropped case V2_12 | V2_13 as those are only versions available, so that was redundant

@jozic

jozic commented Feb 16, 2026

Copy link
Copy Markdown
Contributor Author

@TimvdLippe another baby step )
no rush, when you have time

@TimvdLippe TimvdLippe merged commit 614ad21 into mockito:release/2.x Feb 19, 2026
5 checks passed
@jozic jozic deleted the set-structure-macro-common branch February 20, 2026 00:04
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