Kapt: Restore line mappings correctly for nested classes and its members
This commit is contained in:
+2
-2
@@ -95,13 +95,13 @@ class KaptStubLineInformation {
|
|||||||
}
|
}
|
||||||
is JCTree.JCClassDecl -> {
|
is JCTree.JCClassDecl -> {
|
||||||
val className = parent.simpleName.toString()
|
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) {
|
if (declaration === parent) {
|
||||||
return newName
|
return newName
|
||||||
}
|
}
|
||||||
|
|
||||||
for (definition in parent.defs) {
|
for (definition in parent.defs) {
|
||||||
getFqName(declaration, definition, className)?.let { return it }
|
getFqName(declaration, definition, newName)?.let { return it }
|
||||||
}
|
}
|
||||||
|
|
||||||
return null
|
return null
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
// STRICT_MODE
|
// STRICT_MODE
|
||||||
|
|
||||||
// EXPECTED_ERROR(java:23:50) cannot find symbol
|
// EXPECTED_ERROR(kotlin:12:9) cannot find symbol
|
||||||
// EXPECTED_ERROR(java:28:49) cannot find symbol
|
|
||||||
// EXPECTED_ERROR(other:-1:-1) Can't generate a stub for 'Foo$Bar$Bar'.
|
// EXPECTED_ERROR(other:-1:-1) Can't generate a stub for 'Foo$Bar$Bar'.
|
||||||
|
|
||||||
class Foo(private val string: String) {
|
class Foo(private val string: String) {
|
||||||
|
|||||||
Reference in New Issue
Block a user