Closed ankushg closed 1 year ago
@ankushg did you upgrade to AGP8 and Java17? I had my tests running but upgraded dependencies and it seems that matters. Haven't done proper git bisecting yet but I suspect the issue is there as I didn't change any sources
Confirmed. Reverting to:
sourceCompatibility
VERSION_17 to VERSION 1_8jvmTarget
"17" to "1.8"
Fixes testsFix released in v1.14.0.
I'm running into issues with
sealed interface
s andsealed class
es when attempting to match in a Mock withisAny()
The stacktrace is coming from
ArgConstraintsBuilder.toReturn
which calls
References.getReference
which callscls.isInstance(ref)
which seems eventually seems to throw an error for sealed interfaces fromvalidateProxyInterfaces
I've worked around it for now by rewriting tests to just explicitly assert equality instead of using
isAny()
, but this should probably at least be documented 😅