You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm running into issues with sealed interfaces and sealed classes when attempting to match in a Mock with isAny()
The stacktrace is coming from ArgConstraintsBuilder.toReturn
which calls References.getReference
which calls cls.isInstance(ref) which seems eventually seems to throw an error for sealed interfaces from validateProxyInterfaces
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 😅
The text was updated successfully, but these errors were encountered:
@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
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 calls
cls.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 😅The text was updated successfully, but these errors were encountered: