Resolve constructors declared in traits and objects

It prevents exceptions and produces less red code

 #EA-68667 Fixed
This commit is contained in:
Denis Zharkov
2015-05-29 15:58:08 +03:00
parent 7f9d2e8a36
commit 70dbbd8fda
23 changed files with 179 additions and 31 deletions
@@ -1,14 +1,16 @@
// !DIAGNOSTICS: -MISSING_CONSTRUCTOR_KEYWORD
class C(val a: String) {}
interface T1<!CONSTRUCTOR_IN_TRAIT!>(val x: String)<!> {}
interface T2<!CONSTRUCTOR_IN_TRAIT!>()<!> {}
interface T2 <!CONSTRUCTOR_IN_TRAIT!>constructor()<!> {}
interface T3 private <!CONSTRUCTOR_IN_TRAIT!>constructor(<!UNUSED_PARAMETER!>a<!>: Int)<!> {}
interface T4 {
<!CONSTRUCTOR_IN_TRAIT!>constructor(a: <!DEBUG_INFO_MISSING_UNRESOLVED!>Int<!>)<!> {
val b: <!DEBUG_INFO_MISSING_UNRESOLVED!>Int<!> = 1
<!CONSTRUCTOR_IN_TRAIT!>constructor(<!UNUSED_PARAMETER!>a<!>: Int)<!> {
val <!UNUSED_VARIABLE!>b<!>: Int = 1
}
}