[FIR] Improve UPPER_BOUND_VIOLATED message
Suggest removing explicit type arguments when the upper bound is a captured type since the only way to satisfy the upper bounds is by letting the type variable be inferred to its bound. #KT-65681 Fixed
This commit is contained in:
committed by
Space Team
parent
91e4837c95
commit
58264e177f
+1
@@ -0,0 +1 @@
|
||||
|
||||
Vendored
+5
@@ -0,0 +1,5 @@
|
||||
/capturedUpperBound.fir.kt:(100,120): error: Type argument is not within its bounds: should be subtype of 'CapturedType(*)'. Consider removing the explicit type arguments.
|
||||
|
||||
/capturedUpperBound.fir.kt:(136,150): error: Type argument is not within its bounds: should be subtype of 'CapturedType(*)'. Consider removing the explicit type arguments.
|
||||
|
||||
/capturedUpperBound.fir.kt:(166,182): error: Type argument is not within its bounds: should be subtype of 'CapturedType(*)'. Consider removing the explicit type arguments.
|
||||
+1
@@ -1,4 +1,5 @@
|
||||
// ISSUE: KT-65712
|
||||
// RENDER_DIAGNOSTICS_FULL_TEXT
|
||||
|
||||
fun test(a: BodySpec<List<*>, *>) {
|
||||
a.value<<!UPPER_BOUND_VIOLATED!>BodySpec<List<*>, *><!>>()
|
||||
|
||||
+1
@@ -1,4 +1,5 @@
|
||||
// ISSUE: KT-65712
|
||||
// RENDER_DIAGNOSTICS_FULL_TEXT
|
||||
|
||||
fun test(a: BodySpec<List<*>, *>) {
|
||||
a.value<BodySpec<List<*>, *>>()
|
||||
|
||||
Reference in New Issue
Block a user