KT-2631 Check multiple assignment - in progress

check multiple declaration without specified type annotation
This commit is contained in:
Svetlana Isakova
2012-08-17 18:58:40 +04:00
committed by Andrey Breslav
parent 68ebdabf8f
commit a0da232ed3
6 changed files with 103 additions and 0 deletions
@@ -0,0 +1,20 @@
package a
class MyClass {
fun component0(<!UNUSED_PARAMETER!>i<!>: Int) {}
}
class MyClass2 {}
<!CONFLICTING_OVERLOADS!>fun MyClass2.component0()<!> = 1.2
<!CONFLICTING_OVERLOADS!>fun MyClass2.component0()<!> = 1.3
fun test(<!UNUSED_PARAMETER!>mc1<!>: MyClass, <!UNUSED_PARAMETER!>mc2<!>: MyClass2) {
val (a, b) = <!COMPONENT_FUNCTION_MISSING, COMPONENT_FUNCTION_MISSING!>mc1<!>
val (c) = <!COMPONENT_FUNCTION_AMBIGUITY!>mc2<!>
//a,b,c are error types
a : Boolean
b : Boolean
c : Boolean
}