Add secondary ctors to incremental analysis

#KT-35121 Fixed
This commit is contained in:
Vladimir Dolzhenko
2019-11-27 14:00:05 +01:00
parent f709377735
commit 95129939d4
7 changed files with 89 additions and 1 deletions
@@ -0,0 +1,10 @@
// TYPE: 'n.toString()'
// OUT_OF_CODE_BLOCK: FALSE
class InSecondaryConstructor(val name: String) {
init {
}
constructor(n: Int): this(<caret>) {
}
}
@@ -0,0 +1,11 @@
// TYPE: '4'
// OUT_OF_CODE_BLOCK: FALSE
fun bar() {
class InnerBoo(val someValue: Int) {
constructor() : this(<caret>) {
}
}
val b = InnerBoo()
}
@@ -0,0 +1,10 @@
// TYPE: 'z'
// OUT_OF_CODE_BLOCK: TRUE
// TODO: Investigate
// SKIP_ANALYZE_CHECK
data class Intz(val q: String)
class InPrimaryConstructor(val x: Int<caret>) {
}
@@ -0,0 +1,16 @@
// TYPE: 'n'
// OUT_OF_CODE_BLOCK: FALSE
fun println(s: String) {
}
class InSecondaryConstructor {
init {
println("Init block")
}
constructor(i: Int) {
printl<caret>("Constructor")
}
}
@@ -0,0 +1,13 @@
// TYPE: 'z'
// OUT_OF_CODE_BLOCK: TRUE
data class Intz(val q: String)
class InSecondaryConstructor {
init {
}
constructor(i: Int<caret>) {
}
}
// SKIP_ANALYZE_CHECK
@@ -0,0 +1,14 @@
// OUT_OF_CODE_BLOCK: FALSE
// TYPE: '4'
fun boo() {
class InnerBoo() {
val someValue: Int
init {
someValue = <caret>
}
}
val b = InnerBoo()
}