// FIR_IDENTICAL // MODULE: javaModule // FILE: one/two/FirstModuleClass.java package one.two; import org.jetbrains.annotations.NotNull; public class FirstModuleClass { public String externalNotNullMethod() { return ""; } @NotNull public String explicitNotNullMethod() { return ""; } } // FILE: one/two/annotations.xml // FILE: usage.kt package usage1 import one.two.FirstModuleClass fun test() { val x = FirstModuleClass() x.externalNotNullMethod()?.foo() x.explicitNotNullMethod()?.foo() } fun String.foo() { } // MODULE: javaModule2 // FILE: three/SecondModuleClass.java package three; import org.jetbrains.annotations.NotNull; public class SecondModuleClass { public static String staticExternalNotNullMethod() { return ""; } @NotNull public static String staticExplicitNotNullMethod() { return ""; } } // FILE: three/annotations.xml // FILE: my/pack/usage.kt package my.pack import three.SecondModuleClass fun test() { SecondModuleClass.staticExternalNotNullMethod()?.foo() SecondModuleClass.staticExplicitNotNullMethod()?.foo() } fun String.foo() { }