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 -> {
|
||||
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,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) {
|
||||
|
||||
Reference in New Issue
Block a user