[FIR] Make rendering of properties for diagnostics more user-friendly

#KT-60137 Fixed
This commit is contained in:
Kirill Rakhman
2023-07-26 17:27:19 +02:00
committed by Space Team
parent b5ea059861
commit ed6948959c
16 changed files with 79 additions and 16 deletions
@@ -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
^
@@ -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]
@@ -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
}
}
@@ -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
}
}