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
copied the existing test class in javaWildcard2 but without the @JvmSupressWildcard on class level.
copied the ksp1 output to ksp1 test expected result.
copied the ksp1 output to ksp2 test expected result, and reordered to match ksp2
Run :compiler-plugin:test: See succeed.
Run :kotlin-analysis-api:test: See failure. Meaning expected (ksp1 output) have difference with actual (ksp2 output)
Specifically, you can see things like numberList : List<Number> output numberList : List<out Number> in ksp1 but output numberList : List<Number> in ksp2
The text was updated successfully, but these errors were encountered:
I found the behavior only differ for types without a explicit @JvmSuppressWildcard or @JvmWildcard. If you have a @JvmWildcard on the type, or a @JvmSupressWildcard(supress=true or false) on parent class declaration, then both ksp1 and ksp2 will match the annotation. In other word, for function param type, the ksp1's default behavior seems to be doing jvmwildcard, while ksp2's default behavior seems to be suppressing jvm wildcard.
For a method, if it have
List<Foo>
param,List<out Foo>
List<Foo>
.This has caused lots of difference in codegen, which then cause errors like
did not override
, etc.Repro
Specifically, you can see things like
numberList : List<Number>
outputnumberList : List<out Number>
in ksp1 but outputnumberList : List<Number>
in ksp2The text was updated successfully, but these errors were encountered: