In cases when signature of special bridge is the same as current method,
but type is not 'Any?'.
Also there is tiny optimization:
only null check needed if value parameter type is mapped to Object,
but it's not nullable.
#KT-9973 Fixed
- base class method wins against a (default) interface method,
so an abstract base class method should always be implemented
in a derived class;
- interface methods clash regardless of abstract/default
with possibly undefined behavior at run-time,
so a class or interface should always define its own method
for methods inherited from multiple interfaces and not from base class;
- meaningful diagnostics for class inheriting conflicting JVM signatures.
Since no override will happen under Java 8 rules,
ACCIDENTAL_OVERRIDE is misleading for this case;
- update testData.
This proved to be a fragile technique, which probably doesn't even improve
performance in most cases but has lots of unexpected problems: unconditional
initialization of reflection classes, increasing the size of the bytecode, bugs
with <clinit> in annotations on JVM 6, inability to support conversion of a
class from Kotlin to Java without recompiling clients which use it
reflectively, etc.
0. Such properties are called special because their accessor JVM name differs from usual one
1. When making call to such property, always choose special name
2. When generating Kotlin class inheriting such property generate `final bridge int size() { return this.getSize(); }`
3. If there is no `size` declaration in current class generate `bridge int getSize() { // super-call }`
This format of the string table allows to reduce the size of the Kotlin
metadata in JVM class files by reusing constants already present in the
constant pool. Currently the string table produced by JvmStringTable is not
fully optimized in serialization (in particular, the 'substring' operation
which will be used to extract type names out of generic signature, is not used
at all), but the format and its complete support in the deserialization
(JvmNameResolver) allows future improvement without changing the binary version
Delete the old ones in package kotlin.reflect.jvm because otherwise the code
using those functions will become red in a lot less meaningful way (overload
resolution ambiguity) than if they're deleted (unresolved import)
Based on the work originally done by @dnpetrov
#KT-8380 Fixed
Annotation arguments with default values are rendered as ... if renderDefaultAnnotationArguments is true.
Tests: java retention does not taken into account by Descriptor comparator.
Java retentinon changed to kotlin retention in some tests + one new test with java retention added.
More accurate tests for intentions in byte code (visibility controlled).