mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-08 15:53:19 +00:00
Assignment operations test fix:
these methods used in expressions like a = a + b, so they need to return NotNull when receiver is NotNull
This commit is contained in:
committed by
Evgeny Gerashchenko
parent
48ca1bd453
commit
c4746bc90f
@@ -1,25 +1,27 @@
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
class JavaClass {
|
||||
JavaClass plus(Runnable i) {
|
||||
@NotNull JavaClass plus(Runnable i) {
|
||||
i.run();
|
||||
return this;
|
||||
}
|
||||
|
||||
JavaClass minus(Runnable i) {
|
||||
@NotNull JavaClass minus(Runnable i) {
|
||||
i.run();
|
||||
return this;
|
||||
}
|
||||
|
||||
JavaClass times(Runnable i) {
|
||||
@NotNull JavaClass times(Runnable i) {
|
||||
i.run();
|
||||
return this;
|
||||
}
|
||||
|
||||
JavaClass div(Runnable i) {
|
||||
@NotNull JavaClass div(Runnable i) {
|
||||
i.run();
|
||||
return this;
|
||||
}
|
||||
|
||||
JavaClass mod(Runnable i) {
|
||||
@NotNull JavaClass mod(Runnable i) {
|
||||
i.run();
|
||||
return this;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user