Descriptors from library source should be visible from descriptors from libraries class files

This commit is contained in:
Natalia Ukhorskaya
2016-03-16 16:49:16 +03:00
parent 5b489d1986
commit 6752d0f180
6 changed files with 38 additions and 0 deletions
@@ -237,6 +237,10 @@ internal data class LibrarySourceInfo(val project: Project, val library: Library
return listOf(this) + LibraryInfo(project, library).dependencies()
}
override fun modulesWhoseInternalsAreVisible(): Collection<ModuleInfo> {
return listOf(LibraryInfo(project, library))
}
override fun toString() = "LibrarySourceInfo(libraryName=${library.name})"
}
@@ -0,0 +1,6 @@
package fileWithInternal
fun test() {
// Breakpoint
val a = fileWithInternal2.MyInternal()
}
@@ -0,0 +1,3 @@
package fileWithInternal2
internal class MyInternal
+8
View File
@@ -0,0 +1,8 @@
LineBreakpoint created at fileWithInternal.kt:5
!JDK_HOME!\bin\java -agentlib:jdwp=transport=dt_socket,address=!HOST_NAME!:!HOST_PORT!,suspend=y,server=n -Dfile.encoding=!FILE_ENCODING! -classpath !OUTPUT_PATH!;!KOTLIN_RUNTIME!;!CUSTOM_LIBRARY!;!RT_JAR! fileWithError.FileWithErrorKt
Connected to the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
fileWithInternal.kt:5
Compile bytecode for 1
Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
Process finished with exit code 0
@@ -0,0 +1,11 @@
package fileWithError
fun main(args: Array<String>) {
// There is an error about internal visibility while analyzing fileWithInternal.kt
fileWithInternal.test()
}
// ADDITIONAL_BREAKPOINT: fileWithInternal.kt:Breakpoint
// EXPRESSION: 1
// RESULT: 1: I
@@ -145,6 +145,12 @@ public class KotlinEvaluateExpressionTestGenerated extends AbstractKotlinEvaluat
doSingleBreakpointTest(fileName);
}
@TestMetadata("fileWithError.kt")
public void testFileWithError() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/fileWithError.kt");
doSingleBreakpointTest(fileName);
}
@TestMetadata("funFromSuperClass.kt")
public void testFunFromSuperClass() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/debugger/tinyApp/src/evaluate/singleBreakpoint/funFromSuperClass.kt");