Rename: Check redeclaration for local variables
Also add tests for other local declarations #KT-13255 Fixed
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
// SHOULD_FAIL_WITH: Class 'LocalClassB' is already declared in function 'containNames'
|
||||
fun containNames() {
|
||||
class <caret>LocalClassA {}
|
||||
class LocalClassB {}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
// SHOULD_FAIL_WITH: Function 'localFunB' is already declared in function 'containNames'
|
||||
fun containNames() {
|
||||
fun <caret>localFunA() = 11
|
||||
fun localFunB() = 12
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
// SHOULD_FAIL_WITH: Variable 'localValB' is already declared in function 'containNames'
|
||||
fun containNames() {
|
||||
val <caret>localValA = 11
|
||||
val localValB = 12
|
||||
}
|
||||
Reference in New Issue
Block a user