mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-08 15:53:19 +00:00
Intrinsics.checkParameterIsNotNull() gets its caller's class and method names from the stack trace to render them in an exception message. Fix codegen tests because now it's now allowed to pass null to non-null argument in tests
18 lines
400 B
Java
18 lines
400 B
Java
package test;
|
|
|
|
import org.jetbrains.annotations.NotNull;
|
|
|
|
public abstract class doGenerateParamAssertions {
|
|
|
|
public abstract void bar(@NotNull String s);
|
|
|
|
public static String foo(doGenerateParamAssertions a) {
|
|
try {
|
|
a.bar(null);
|
|
} catch (IllegalArgumentException e) {
|
|
return "OK";
|
|
}
|
|
return "Fail: AssertionError expected";
|
|
}
|
|
}
|