i don’t know but sometimes, by listening to what i...
# announcements
n
i don’t know but sometimes, by listening to what intellij tells you do to the code doesn’t compile anymore
👍 2
s
Do you have an example? Never experienced it myself
n
Copy code
@SpringBootApplication
class SwissTrainApplication {

    @Bean
    fun demo(config: ServiceConfig): CommandLineRunner {
        return CommandLineRunner {
            with(Pipeline.create()) {
                drawFrom(remoteService(config.url, config.token))
                    .withoutTimestamps()
                    .filter(PredicateEx { it.startsWith("{\"id\":\"") })
                    .map(FunctionEx<String, String> { it.removeSuffix(",") })
                    .mapUsingContext(ContextFactory.withCreateFn(createObjectMapper), toWrapper)
                    .drainTo(Sinks.logger())
                Jet.newJetInstance().withCloseable().use {
                    it.newJob(this).join()
                }
            }
        }
    }
}
if one removes `PredicateEx`and
FunctionEx<String, String>
it compiles but fails at runtime
(this is hazelcast jet API, serializable flavors of the
java.util
package)
now i realize i didn’t have the example you required 😅
m
Are you using an older version of Kotlin? This sounds like a difference in inference computations. The plugin is using the latest, so if you aren't on 1.3.50, you may notice differences at compile time.
n
nope it’s just that simon asked for an example about wrong inference at compile-time and i showed a sample with an issue at runtime