diff --git a/compiler/testData/checkerWithErrorTypes/quick/regressions/kt127.jet b/compiler/testData/checkerWithErrorTypes/quick/regressions/kt127.jet new file mode 100644 index 00000000000..7bcb076f08c --- /dev/null +++ b/compiler/testData/checkerWithErrorTypes/quick/regressions/kt127.jet @@ -0,0 +1,15 @@ +// KT-127 Support extension functions in when expressions + +class Foo() {} + +fun Any.equals(other : Any?) : Boolean = true +fun Any?.equals1(other : Any?) : Boolean = true + +fun main(args: Array) { + + val command : Foo? = null + when (command) { + .equals(null) => 1; // must be resolved + ?.equals(null) => 1 // same here + } +}