Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,17 @@ class BytecodeRemappingTest {
assertThat(checkNotNull(method.signature)).contains("L$relocatedFixtureBase;")
}

@Test
fun nestedClassSignatureIsRelocated() {
val result = fixtureSubjectDetails.remapClass(relocators)

val method = result.classInfo().methodData.first { it.name == "methodWithNestedGeneric" }
assertThat(checkNotNull(method.signature))
.isEqualTo(
$$"(Lcom/example/relocated/BytecodeRemappingTest$FixtureGenericOuter<Lcom/example/relocated/BytecodeRemappingTest$FixtureBase;>.FixtureInner;)V"
)
Comment thread
Goooler marked this conversation as resolved.
}

@Test
fun localVariableIsRelocated() {
val result = fixtureSubjectDetails.remapClass(relocators)
Expand Down Expand Up @@ -255,6 +266,10 @@ class BytecodeRemappingTest {

open class FixtureBase

class FixtureGenericOuter<T> {
inner class FixtureInner
}

@Suppress("unused") // Used by parsing bytecode.
@FixtureAnnotation
class FixtureSubject : FixtureBase(), FixtureInterface {
Expand Down Expand Up @@ -292,6 +307,8 @@ class BytecodeRemappingTest {
}

fun methodWithGeneric(list: List<FixtureBase>): FixtureBase = list[0]

fun methodWithNestedGeneric(arg: FixtureGenericOuter<FixtureBase>.FixtureInner) = Unit
}
}

Expand Down