Debugger: Allow to touch experimental stuff from evaluator (KT-30216)
This commit is contained in:
+2
-1
@@ -383,7 +383,8 @@ class KotlinEvaluator(val codeFragment: KtCodeFragment, val sourcePosition: Sour
|
||||
override fun getModifier() = null
|
||||
|
||||
companion object {
|
||||
private val IGNORED_DIAGNOSTICS: Set<DiagnosticFactory<*>> = Errors.INVISIBLE_REFERENCE_DIAGNOSTICS
|
||||
private val IGNORED_DIAGNOSTICS: Set<DiagnosticFactory<*>> =
|
||||
Errors.INVISIBLE_REFERENCE_DIAGNOSTICS + setOf(Errors.EXPERIMENTAL_API_USAGE_ERROR)
|
||||
|
||||
private val DEFAULT_METHOD_MARKERS = listOf(AsmTypes.OBJECT_TYPE, AsmTypes.DEFAULT_CONSTRUCTOR_MARKER)
|
||||
|
||||
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
package experimentalApi
|
||||
|
||||
@Experimental(Experimental.Level.ERROR)
|
||||
annotation class UnstableApi
|
||||
|
||||
@UnstableApi
|
||||
fun foo() = 5
|
||||
|
||||
fun main() {
|
||||
//Breakpoint!
|
||||
val a = 5
|
||||
}
|
||||
|
||||
// EXPRESSION: foo()
|
||||
// RESULT: 5: I
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
LineBreakpoint created at experimentalApi.kt:11
|
||||
Run Java
|
||||
Connected to the target VM
|
||||
experimentalApi.kt:11
|
||||
Compile bytecode for foo()
|
||||
Disconnected from the target VM
|
||||
|
||||
Process finished with exit code 0
|
||||
Generated
+5
@@ -141,6 +141,11 @@ public class KotlinEvaluateExpressionTestGenerated extends AbstractKotlinEvaluat
|
||||
runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/escapedNames.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("experimentalApi.kt")
|
||||
public void testExperimentalApi() throws Exception {
|
||||
runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/experimentalApi.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("extractLocalVariables.kt")
|
||||
public void testExtractLocalVariables() throws Exception {
|
||||
runTest("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/extractLocalVariables.kt");
|
||||
|
||||
Reference in New Issue
Block a user