Kapt: Restore line mappings correctly for nested classes and its members

This commit is contained in:
Yan Zhulanow
2018-07-16 21:23:41 +03:00
parent 2328cecffe
commit b145c97b37
2 changed files with 3 additions and 4 deletions
@@ -95,13 +95,13 @@ class KaptStubLineInformation {
}
is JCTree.JCClassDecl -> {
val className = parent.simpleName.toString()
val newName = if (currentName.isEmpty()) className else currentName + "#" + className
val newName = if (currentName.isEmpty()) className else currentName + "$" + className
if (declaration === parent) {
return newName
}
for (definition in parent.defs) {
getFqName(declaration, definition, className)?.let { return it }
getFqName(declaration, definition, newName)?.let { return it }
}
return null
+1 -2
View File
@@ -1,7 +1,6 @@
// STRICT_MODE
// EXPECTED_ERROR(java:23:50) cannot find symbol
// EXPECTED_ERROR(java:28:49) cannot find symbol
// EXPECTED_ERROR(kotlin:12:9) cannot find symbol
// EXPECTED_ERROR(other:-1:-1) Can't generate a stub for 'Foo$Bar$Bar'.
class Foo(private val string: String) {