Idea hinting java variable type as (T..T?) rather than T! e.g. (String..Sting?) rather than String!

Due to this understanding variable type becomes harder and complicated. for e.g. for variable assigned to kafka consumer.poll() it's hinting like

val consumerRecords: (ConsumerRecords<(String..String?), (String..String?)>..ConsumerRecords<(String..String?), (String..String?)>?)

which can be simplified to

val consumerRecords: ConsumerRecords<String!, String!)>!

for this use case with key and value types as String.
It's also happening with simple java framework classes.
for e.g.

val element = queue.poll()

with queue being a String blocking queue it's giving (Sting..Sting?) rather than String! when pressed ctrl-q with cursor on element.
This is not a problem for simple variables but with something like above the situation just multiplies. And i don't want to explicitly define variable type everywhere. like 

val consumerRecords: ConsumerRecords<String, String> = consumer.poll(Duration.ofMillis(100))

it should be auto inferred. At least that's what kotlin makes kotlin. :)
my idea config:

IntelliJ IDEA 2021.3.2 (Community Edition)
Build #IC-213.6777.52, built on January 28, 2022
Runtime version: 11.0.13+7-b1751.25 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Linux 5.4.0-99-generic
GC: G1 Young Generation, G1 Old Generation
Memory: 1984M
Cores: 8
Non-Bundled Plugins:
    org.jetbrains.kotlin (213-1.6.10-release-961-IJ6777.52)
    Docker (213.6461.58)

Kotlin: 213-1.6.10-release-961-IJ6777.52
Current Desktop: X-Cinnamon
0

Please sign in to leave a comment.