Skip to content

Commit a2fea2b

Browse files
cypressiousSpace Team
authored and
Space Team
committed
[Tests] Add more tests for EXTENSION_SHADOWED_BY_MEMBER
#KT-75169
1 parent 7df7b34 commit a2fea2b

File tree

3 files changed

+9
-13
lines changed

3 files changed

+9
-13
lines changed

compiler/testData/diagnostics/tests/extensionShadowedByMember.diag.txt

-4
This file was deleted.

compiler/testData/diagnostics/tests/extensionShadowedByMember.fir.diag.txt

-1
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
// RUN_PIPELINE_TILL: BACKEND
22
// FIR_IDENTICAL
3-
// ISSUE: KT-54483
4-
// RENDER_DIAGNOSTICS_FULL_TEXT
3+
// ISSUE: KT-54483, KT-75169
54
// WITH_STDLIB
65

76
abstract class Cache {
8-
abstract fun <T> getTyped(key: Any, klass: Class<T>): T
9-
10-
fun get(key: Any): Int = 10
7+
fun get(): Int = 10
8+
fun get2(): Int = 10
9+
fun <T> get3(): Int = 10
10+
fun <T : CharSequence> get4(): Int = 10
1111
}
1212

13-
inline fun <reified T> Cache.<!EXTENSION_SHADOWED_BY_MEMBER!>get<!>(key: Any) = getTyped(key, T::class.java)
14-
15-
fun Cache.getString(key: Any) = get<String>(key)
13+
inline fun <reified T> Cache.<!EXTENSION_SHADOWED_BY_MEMBER!>get<!>() = 10
14+
fun <T> Cache.<!EXTENSION_SHADOWED_BY_MEMBER!>get2<!>() = 10
15+
fun <T, R> Cache.<!EXTENSION_SHADOWED_BY_MEMBER!>get3<!>() = 10
16+
fun <T : List<String>> Cache.<!EXTENSION_SHADOWED_BY_MEMBER!>get4<!>() = 10

0 commit comments

Comments
 (0)