[FIR] Make rendering of properties for diagnostics more user-friendly
#KT-60137 Fixed
This commit is contained in:
committed by
Space Team
parent
b5ea059861
commit
ed6948959c
+6
@@ -0,0 +1,6 @@
|
||||
/RedeclarationThroughDestructuring.kt:5:14: error: conflicting declarations: val b: String, val b: Int
|
||||
val (b, b) = e
|
||||
^
|
||||
/RedeclarationThroughDestructuring.kt:5:17: error: conflicting declarations: val b: String, val b: Int
|
||||
val (b, b) = e
|
||||
^
|
||||
Vendored
+3
@@ -0,0 +1,3 @@
|
||||
/RedeclarationThroughDestructuring.fir.kt:(133,134): error: Conflicting declarations: [local val b: String, local val b: Int]
|
||||
|
||||
/RedeclarationThroughDestructuring.fir.kt:(136,137): error: Conflicting declarations: [local val b: String, local val b: Int]
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
// RENDER_DIAGNOSTICS_FULL_TEXT
|
||||
|
||||
data class Example(val a: String, val b: Int) {
|
||||
fun testRedeclaration(e: Example){
|
||||
val (<!REDECLARATION!>b<!>, <!REDECLARATION!>b<!>) = e
|
||||
}
|
||||
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
// RENDER_DIAGNOSTICS_FULL_TEXT
|
||||
|
||||
data class Example(val a: String, val b: Int) {
|
||||
fun testRedeclaration(e: Example){
|
||||
val (<!REDECLARATION!>b<!>, <!NAME_SHADOWING, REDECLARATION!>b<!>) = e
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user