mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-08 15:53:19 +00:00
Refine stubs generation for special built-ins
Do not generate stub if declaration has the same signature #KT-12909 Fixed
This commit is contained in:
23
compiler/testData/codegen/bytecodeListing/specialBridges/redundantStubForSize.kt
vendored
Normal file
23
compiler/testData/codegen/bytecodeListing/specialBridges/redundantStubForSize.kt
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
open class A1 {
|
||||
open val size: Int = 56
|
||||
}
|
||||
|
||||
class A2 : A1(), Collection<String> {
|
||||
// No 'getSize()' method should be generated in A2
|
||||
|
||||
override fun contains(element: String): Boolean {
|
||||
throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates.
|
||||
}
|
||||
|
||||
override fun containsAll(elements: Collection<String>): Boolean {
|
||||
throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates.
|
||||
}
|
||||
|
||||
override fun isEmpty(): Boolean {
|
||||
throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates.
|
||||
}
|
||||
|
||||
override fun iterator(): Iterator<String> {
|
||||
throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates.
|
||||
}
|
||||
}
|
||||
27
compiler/testData/codegen/bytecodeListing/specialBridges/redundantStubForSize.txt
vendored
Normal file
27
compiler/testData/codegen/bytecodeListing/specialBridges/redundantStubForSize.txt
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
@kotlin.Metadata
|
||||
public class A1 {
|
||||
private final field size: int
|
||||
public method <init>(): void
|
||||
public method getSize(): int
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
public final class A2 {
|
||||
public method <init>(): void
|
||||
public synthetic method add(p0: java.lang.Object): boolean
|
||||
public method add(p0: java.lang.String): boolean
|
||||
public method addAll(p0: java.util.Collection): boolean
|
||||
public method clear(): void
|
||||
public method contains(@org.jetbrains.annotations.NotNull p0: java.lang.String): boolean
|
||||
public final method contains(p0: java.lang.Object): boolean
|
||||
public method containsAll(@org.jetbrains.annotations.NotNull p0: java.util.Collection): boolean
|
||||
public method isEmpty(): boolean
|
||||
public @org.jetbrains.annotations.NotNull method iterator(): java.util.Iterator
|
||||
public method remove(p0: java.lang.Object): boolean
|
||||
public method remove(p0: java.lang.String): boolean
|
||||
public method removeAll(p0: java.util.Collection): boolean
|
||||
public method retainAll(p0: java.util.Collection): boolean
|
||||
public final method size(): int
|
||||
public method toArray(): java.lang.Object[]
|
||||
public method toArray(p0: java.lang.Object[]): java.lang.Object[]
|
||||
}
|
||||
Reference in New Issue
Block a user