[FIR-TEST] Add new testdata generated after changes in previous commit

This commit is contained in:
Dmitriy Novozhilov
2019-12-11 16:16:22 +03:00
parent e9c02a1cca
commit 2536fa0cd5
4578 changed files with 104067 additions and 1 deletions
@@ -0,0 +1,18 @@
// !DIAGNOSTICS: -UNUSED_PARAMETER -PLATFORM_CLASS_MAPPED_TO_KOTLIN
abstract class Test1 : Map<String, String> {
fun containsKey(key: String): Boolean = TODO()
fun getOrDefault(key: String, defaultValue: String): String = TODO()
}
abstract class Test2 : MutableMap<String, String> {
fun replace(key: String, value: String): String? = TODO()
}
abstract class Test3 : java.util.AbstractMap<String, String>() {
fun containsKey(key: String): Boolean = TODO()
fun replace(key: String, value: String): String? = TODO()
}
@@ -0,0 +1,32 @@
// !DIAGNOSTICS: -UNUSED_PARAMETER -PLATFORM_CLASS_MAPPED_TO_KOTLIN
// Default methods from Java interfaces are NOT overridden by delegation.
// So, in the example below 'TestNoDelegationToDefaultMethods#replace' implicitly overrides a method from 'java.util.Map' (which is ok),
// but not a method from 'WithDelegation' (would be an error).
open class WithDelegation(val m: Map<String, String>) : Map<String, String> by m
class TestNoDelegationToDefaultMethods(m: Map<String, String>): WithDelegation(m) {
fun containsKey(key: String): Boolean = TODO()
fun getOrDefault(key: String, defaultValue: String): String = TODO()
fun replace(key: String, value: String): String? = TODO()
}
interface IBaseWithKotlinDeclaration : Map<String, String> {
fun replace(key: String, value: String): String?
}
abstract class WithDelegation2(val m: Map<String, String>) : Map<String, String> by m, IBaseWithKotlinDeclaration
abstract class TestNoDelegationToDefaultMethods2(m: Map<String, String>): WithDelegation2(m) {
fun containsKey(key: String): Boolean = TODO()
fun getOrDefault(key: String, defaultValue: String): String = TODO()
// VIRTUAL_MEMBER_HIDDEN: hides member declaration inherited from a Kotlin interface
fun replace(key: String, value: String): String? = TODO()
}
@@ -0,0 +1,13 @@
// !DIAGNOSTICS: -UNUSED_PARAMETER -PLATFORM_CLASS_MAPPED_TO_KOTLIN
interface IBase : Map<String, String>
interface TestDerivedInterfaceHiding : IBase {
fun replace(key: String, value: String): String?
}
interface TestDerivedInterfaceDefault : IBase {
fun replace(key: String, value: String): String? = TODO()
}
@@ -0,0 +1,15 @@
// !DIAGNOSTICS: -UNUSED_PARAMETER -PLATFORM_CLASS_MAPPED_TO_KOTLIN
interface IBaseWithKotlinDeclaration : Map<String, String> {
fun replace(key: String, value: String): String?
}
interface TestDerivedInterfaceHidingWithKotlinDeclaration : IBaseWithKotlinDeclaration {
// VIRTUAL_MEMBER_HIDDEN: hides member declaration inherited from a Kotlin interface
fun replace(key: String, value: String): String?
}
interface TestDerivedInterfaceDefaultWithKotlinDeclaration : IBaseWithKotlinDeclaration {
// VIRTUAL_MEMBER_HIDDEN: hides member declaration inherited from a Kotlin interface
fun replace(key: String, value: String): String? = TODO()
}
@@ -0,0 +1,4 @@
// JAVAC_EXPECTED_FILE
class ControlFlowException : Exception("") {
fun fillInStackTrace() = this
}
@@ -0,0 +1,10 @@
enum class TestEnum {
ENTRY;
fun getDeclaringClass() {}
fun finalize() {}
}
class TestFinalize {
fun finalize() {}
}
@@ -0,0 +1,6 @@
// !DIAGNOSTICS: -UNUSED_PARAMETER -PLATFORM_CLASS_MAPPED_TO_KOTLIN
// JAVAC_EXPECTED_FILE
class MyHashMap : java.util.HashMap<String, String>() {
fun getOrDefault(key: String, defaultValue: String): String = TODO()
}