Debugger: Forbid 'Nothing' constructor calls in evaluated code (KT-33093)
This commit is contained in:
+28
@@ -0,0 +1,28 @@
|
||||
package nothing
|
||||
|
||||
fun main() {
|
||||
//Breakpoint!
|
||||
val a = 5
|
||||
}
|
||||
|
||||
fun block(foo: () -> Unit) {
|
||||
foo()
|
||||
}
|
||||
|
||||
// EXPRESSION: Nothing()
|
||||
// RESULT: 'Nothing' can't be instantiated
|
||||
|
||||
// EXPRESSION: "" + Nothing()
|
||||
// RESULT: 'Nothing' can't be instantiated
|
||||
|
||||
// EXPRESSION: run { Nothing() }
|
||||
// RESULT: 'Nothing' can't be instantiated
|
||||
|
||||
// EXPRESSION: { Nothing() }
|
||||
// RESULT: 'Nothing' can't be instantiated
|
||||
|
||||
// EXPRESSION: block { Nothing() }
|
||||
// RESULT: 'Nothing' can't be instantiated
|
||||
|
||||
// EXPRESSION: fun foo() { Nothing() }
|
||||
// RESULT: 'Nothing' can't be instantiated
|
||||
Reference in New Issue
Block a user