turansky
06/04/2021, 6:39 PMtypealias
in different modules? Like this one:
package react
typealias FC<P> = FunctionalComponent<P>
Zach Klippenstein (he/him) [MOD]
06/04/2021, 7:04 PMturansky
06/04/2021, 7:31 PMturansky
06/04/2021, 7:32 PMandylamax
06/04/2021, 10:21 PMturansky
06/04/2021, 11:19 PMkqr
06/05/2021, 1:09 PMturansky
06/05/2021, 1:32 PMdmitriy.novozhilov
06/06/2021, 7:21 PM// MODULE: lib1
public class A {
public void foo() {}
}
// MODULE: lib2
public class A {
public void bar() {}
}
// MODULE: app (depends on lib1 and lib 2)
public class Main {
public static void test(A a) {
a.foo(); // (1)
a.bar(); // (2)
}
}
Which line ((1)
or (2)
) will be assumed as compile error? What happend on runtime if we comment errornous line?dmitriy.novozhilov
06/06/2021, 7:24 PM(1)
and it will be compiled successfully (because compilation classpath was lib2.jar;lib1.jar
) there is no guarantee that this code won't throw NoSuchMethodError
at runtime (where classpath can be lib1.jar;lib2.jar
)dmitriy.novozhilov
06/06/2021, 7:27 PM