Generate not-null assertions on extension receiver parameters
This commit is contained in:
+17
@@ -0,0 +1,17 @@
|
||||
public class Test {
|
||||
public static String invokeFoo() {
|
||||
try {
|
||||
_DefaultPackage.foo(null);
|
||||
}
|
||||
catch (IllegalArgumentException e) {
|
||||
try {
|
||||
_DefaultPackage.getBar(null);
|
||||
}
|
||||
catch (IllegalArgumentException f) {
|
||||
return "OK";
|
||||
}
|
||||
}
|
||||
|
||||
return "Fail: assertion must have been fired";
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user