Aliased import may throw java.lang.IllegalArgumentException
if nullable and not nullable variants of it are used
#2021
Labels
java.lang.IllegalArgumentException
if nullable and not nullable variants of it are used
#2021
Describe the bug
An aliased import added via addAliasedImport results in exception
java.lang.IllegalArgumentException: Collection has more than one element
if the type is used as nullable and as non-nullable.To Reproduce
Expected behavior
Actual behavior
Additional context
When you change
.addCode("return %T()", PersonId::class)
to.addCode("return null")
it works.When you then add
.addParameter("pid", PersonId::class)
, it breaks again.Used version 2.0.0 above.
Worked with version 1.16.0.
Broken since 1.17.0.
Could be related to #2020
The text was updated successfully, but these errors were encountered: