Ryan Rolnicki
11/14/2021, 5:55 AMsomevar.flatMap { ... }
I get 'not enough information to infer type variable R', which is fine. I do know what R is supposed to be, which means something in my subsequent code isn't what I expect (I think it's clear that R is a Double, the compiler doesn't so there must be something wrong with my code). What I'd like to do to debug is have somevar.flatMap<?, ?, Double>
, so telling the compiler 'infer the first 2 types, and I'll provide the 3rd' because computing the K and V generic types is actually somewhat bothersome, as it's part of a slightly more complicated expression.
Is there some way to do this in Kotlin? If not, is there some context action through intellij? If still not, is there an extension?jimn
11/14/2021, 6:24 AMRyan Rolnicki
11/14/2021, 6:27 AMRyan Rolnicki
11/14/2021, 6:27 AMjimn
11/16/2021, 5:49 AMjimn
11/16/2021, 5:49 AMrusshwolf
11/16/2021, 1:55 PMRyan Rolnicki
11/18/2021, 6:14 AMsomevar.flatMap<_, _, Double>
, which is apparently going to be in 1.7, so I guess that's the answer to my original question 🙂