Fix language features in tests for gradual migration to 1.3 (part 2)
In 1.3, due to changes in language, testdata for some tests can be different from 1.2 We want to simlultaneously test both versions, so instead of fixing language version in such tests, we split them into two: one with fixed 1.2, another with fixed 1.3
This commit is contained in:
@@ -330,6 +330,26 @@ error:
|
||||
sink:
|
||||
<SINK> USE: in: {} out: {}
|
||||
=====================
|
||||
== run ==
|
||||
fun <T, R> T.run(f: T.() -> R) = f()
|
||||
---------------------
|
||||
L0:
|
||||
1 <START> INIT: in: {} out: {}
|
||||
v(f: T.() -> R) INIT: in: {} out: {}
|
||||
magic[FAKE_INITIALIZER](f: T.() -> R) -> <v0> INIT: in: {} out: {}
|
||||
w(f|<v0>) INIT: in: {} out: {}
|
||||
r(f) -> <v1> INIT: in: {} out: {}
|
||||
magic[IMPLICIT_RECEIVER](f()) -> <v2>
|
||||
mark(f())
|
||||
call(f(), invoke|<v1>, <v2>) -> <v3>
|
||||
ret(*|<v3>) L1
|
||||
L1:
|
||||
<END>
|
||||
error:
|
||||
<ERROR>
|
||||
sink:
|
||||
<SINK> USE: in: {} out: {}
|
||||
=====================
|
||||
== exec ==
|
||||
fun <T> exec(f: () -> T): T = f()
|
||||
---------------------
|
||||
|
||||
@@ -60,6 +60,7 @@ class Demo3 {
|
||||
private var state: Boolean = true
|
||||
}
|
||||
|
||||
fun <T, R> T.run(f: T.() -> R) = f()
|
||||
fun <T> exec(f: () -> T): T = f()
|
||||
|
||||
class Demo4 {
|
||||
|
||||
@@ -175,6 +175,14 @@ state <v7>: * NEW: r(state|<v6>
|
||||
println(state) <v8>: * NEW: call(println(state), println|<v7>) -> <v8>
|
||||
if (state) state = true println(state) // OK <v8>: * COPY
|
||||
=====================
|
||||
== run ==
|
||||
fun <T, R> T.run(f: T.() -> R) = f()
|
||||
---------------------
|
||||
<v0>: {<: T.() -> R} NEW: magic[FAKE_INITIALIZER](f: T.() -> R) -> <v0>
|
||||
<v2>: {<: T} NEW: magic[IMPLICIT_RECEIVER](f()) -> <v2>
|
||||
f <v1>: {<: (T) -> R} NEW: r(f) -> <v1>
|
||||
f() <v3>: {<: R} NEW: call(f(), invoke|<v1>, <v2>) -> <v3>
|
||||
=====================
|
||||
== exec ==
|
||||
fun <T> exec(f: () -> T): T = f()
|
||||
---------------------
|
||||
|
||||
@@ -0,0 +1,151 @@
|
||||
== s ==
|
||||
val s = mutableListOf<String>()
|
||||
---------------------
|
||||
L0:
|
||||
1 <START>
|
||||
v(val s = mutableListOf<String>())
|
||||
mark(mutableListOf<String>())
|
||||
magic[UNRESOLVED_CALL](mutableListOf<String>()|!<v0>) -> <v1>
|
||||
w(s|<v1>)
|
||||
L1:
|
||||
<END> NEXT:[<SINK>]
|
||||
error:
|
||||
<ERROR> PREV:[]
|
||||
sink:
|
||||
<SINK> PREV:[<ERROR>, <END>]
|
||||
=====================
|
||||
== test ==
|
||||
fun test(name: String?, flag: Boolean): Boolean {
|
||||
try {
|
||||
name?.let {
|
||||
if (flag) {
|
||||
s.add(it)
|
||||
}
|
||||
else {
|
||||
s.remove(it)
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
} finally {
|
||||
name?.hashCode()
|
||||
}
|
||||
}
|
||||
---------------------
|
||||
L0:
|
||||
1 <START>
|
||||
v(name: String?)
|
||||
magic[FAKE_INITIALIZER](name: String?) -> <v0>
|
||||
w(name|<v0>)
|
||||
v(flag: Boolean)
|
||||
magic[FAKE_INITIALIZER](flag: Boolean) -> <v1>
|
||||
w(flag|<v1>)
|
||||
2 mark({ try { name?.let { if (flag) { s.add(it) } else { s.remove(it) } return true } return false } finally { name?.hashCode() } })
|
||||
mark(try { name?.let { if (flag) { s.add(it) } else { s.remove(it) } return true } return false } finally { name?.hashCode() })
|
||||
jmp?(L2) NEXT:[mark({ name?.hashCode() }), mark({ name?.let { if (flag) { s.add(it) } else { s.remove(it) } return true } return false })]
|
||||
3 mark({ name?.let { if (flag) { s.add(it) } else { s.remove(it) } return true } return false })
|
||||
mark(name?.let { if (flag) { s.add(it) } else { s.remove(it) } return true })
|
||||
jf(L3) NEXT:[jmp?(L2), r(name) -> <v2>]
|
||||
r(name) -> <v2>
|
||||
mark({ if (flag) { s.add(it) } else { s.remove(it) } return true })
|
||||
r({ if (flag) { s.add(it) } else { s.remove(it) } return true }) -> <v3>
|
||||
mark(let { if (flag) { s.add(it) } else { s.remove(it) } return true })
|
||||
call(let { if (flag) { s.add(it) } else { s.remove(it) } return true }, let|<v2>, <v3>)
|
||||
L4 [before inlined declaration]:
|
||||
inlined({ if (flag) { s.add(it) } else { s.remove(it) } return true }) NEXT:[<SINK>]
|
||||
L3 [result of call]:
|
||||
L5 [after inlined declaration]:
|
||||
jmp?(L2) NEXT:[mark({ name?.hashCode() }), r(false) -> <v5>] PREV:[jf(L3)]
|
||||
r(false) -> <v5>
|
||||
6 mark({ name?.hashCode() })
|
||||
mark(name?.hashCode())
|
||||
jf(L13) NEXT:[ret(*|<v5>) L1, r(name) -> <v11>]
|
||||
r(name) -> <v11>
|
||||
mark(hashCode())
|
||||
call(hashCode(), hashCode|<v11>) -> <v12>
|
||||
L13 [copy of L11, result of call]:
|
||||
3 ret(*|<v5>) L1 NEXT:[<END>] PREV:[jf(L13), call(hashCode(), hashCode|<v11>) -> <v12>]
|
||||
- 2 jmp?(L2) NEXT:[mark({ name?.hashCode() }), jmp(L14)] PREV:[]
|
||||
- jmp(L14) NEXT:[mark({ name?.hashCode() })] PREV:[]
|
||||
L2 [onExceptionToFinallyBlock]:
|
||||
6 mark({ name?.hashCode() }) PREV:[jmp?(L2), jmp?(L2)]
|
||||
mark(name?.hashCode())
|
||||
jf(L15) NEXT:[jmp(error), r(name) -> <v11>]
|
||||
r(name) -> <v11>
|
||||
mark(hashCode())
|
||||
call(hashCode(), hashCode|<v11>) -> <v12>
|
||||
L15 [copy of L11, result of call]:
|
||||
2 jmp(error) NEXT:[<ERROR>] PREV:[jf(L15), call(hashCode(), hashCode|<v11>) -> <v12>]
|
||||
L14 [skipFinallyToErrorBlock]:
|
||||
- 6 mark({ name?.hashCode() }) PREV:[]
|
||||
- mark(name?.hashCode()) PREV:[]
|
||||
- jf(L16) NEXT:[merge(try { name?.let { if (flag) { s.add(it) } else { s.remove(it) } return true } return false } finally { name?.hashCode() }|!<v6>) -> <v7>, r(name) -> <v11>] PREV:[]
|
||||
- r(name) -> <v11> PREV:[]
|
||||
- mark(hashCode()) PREV:[]
|
||||
- call(hashCode(), hashCode|<v11>) -> <v12> PREV:[]
|
||||
L16 [copy of L11, result of call]:
|
||||
- 2 merge(try { name?.let { if (flag) { s.add(it) } else { s.remove(it) } return true } return false } finally { name?.hashCode() }|!<v6>) -> <v7> PREV:[]
|
||||
L1:
|
||||
1 <END> NEXT:[<SINK>] PREV:[ret(*|<v10>) L1, ret(*|<v5>) L1]
|
||||
error:
|
||||
<ERROR> PREV:[jmp(error)]
|
||||
sink:
|
||||
<SINK> PREV:[<ERROR>, <END>, inlined({ if (flag) { s.add(it) } else { s.remove(it) } return true })]
|
||||
=====================
|
||||
== inlined anonymous_0 ==
|
||||
{
|
||||
if (flag) {
|
||||
s.add(it)
|
||||
}
|
||||
else {
|
||||
s.remove(it)
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
||||
---------------------
|
||||
L6:
|
||||
4 <START>
|
||||
5 mark(if (flag) { s.add(it) } else { s.remove(it) } return true)
|
||||
mark(if (flag) { s.add(it) } else { s.remove(it) })
|
||||
r(flag) -> <v0>
|
||||
jf(L8|<v0>) NEXT:[mark({ s.remove(it) }), mark({ s.add(it) })]
|
||||
6 mark({ s.add(it) })
|
||||
mark(s.add(it))
|
||||
r(s) -> <v1>
|
||||
r(it) -> <v2>
|
||||
magic[VALUE_CONSUMER](it|<v2>) -> <v3>
|
||||
mark(add(it))
|
||||
call(add(it), <ERROR FUNCTION>|<v1>) -> <v4>
|
||||
5 jmp(L9) NEXT:[merge(if (flag) { s.add(it) } else { s.remove(it) }|<v4>, <v8>) -> <v9>]
|
||||
L8 [else branch]:
|
||||
6 mark({ s.remove(it) }) PREV:[jf(L8|<v0>)]
|
||||
mark(s.remove(it))
|
||||
r(s) -> <v5>
|
||||
r(it) -> <v6>
|
||||
magic[VALUE_CONSUMER](it|<v6>) -> <v7>
|
||||
mark(remove(it))
|
||||
call(remove(it), <ERROR FUNCTION>|<v5>) -> <v8>
|
||||
L9 ['if' expression result]:
|
||||
5 merge(if (flag) { s.add(it) } else { s.remove(it) }|<v4>, <v8>) -> <v9> PREV:[jmp(L9), call(remove(it), <ERROR FUNCTION>|<v5>) -> <v8>]
|
||||
r(true) -> <v10>
|
||||
L10 [start finally]:
|
||||
6 mark({ name?.hashCode() })
|
||||
mark(name?.hashCode())
|
||||
jf(L11) NEXT:[ret(*|<v10>) L1, r(name) -> <v11>]
|
||||
r(name) -> <v11>
|
||||
mark(hashCode())
|
||||
call(hashCode(), hashCode|<v11>) -> <v12>
|
||||
L11 [result of call]:
|
||||
L12 [finish finally]:
|
||||
5 ret(*|<v10>) L1 NEXT:[<END>] PREV:[jf(L11), call(hashCode(), hashCode|<v11>) -> <v12>]
|
||||
- 4 ret(*|!<v13>) L7 PREV:[]
|
||||
L7:
|
||||
- <END> NEXT:[<SINK>] PREV:[]
|
||||
error:
|
||||
- <ERROR> PREV:[]
|
||||
sink:
|
||||
- <SINK> PREV:[]
|
||||
=====================
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
// !LANGUAGE: +ReadDeserializedContracts +UseCallsInPlaceEffect
|
||||
// See KT-18698
|
||||
|
||||
val s = mutableListOf<String>()
|
||||
@@ -0,0 +1,68 @@
|
||||
== s ==
|
||||
val s = mutableListOf<String>()
|
||||
---------------------
|
||||
mutableListOf !<v0>: *
|
||||
mutableListOf<String>() <v1>: {<: [ERROR : Type for mutableListOf<String>()]} NEW: magic[UNRESOLVED_CALL](mutableListOf<String>()|!<v0>) -> <v1>
|
||||
=====================
|
||||
== test ==
|
||||
fun test(name: String?, flag: Boolean): Boolean {
|
||||
try {
|
||||
name?.let {
|
||||
if (flag) {
|
||||
s.add(it)
|
||||
}
|
||||
else {
|
||||
s.remove(it)
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
} finally {
|
||||
name?.hashCode()
|
||||
}
|
||||
}
|
||||
---------------------
|
||||
<v0>: {<: String?} NEW: magic[FAKE_INITIALIZER](name: String?) -> <v0>
|
||||
<v1>: Boolean NEW: magic[FAKE_INITIALIZER](flag: Boolean) -> <v1>
|
||||
name <v2>: String NEW: r(name) -> <v2>
|
||||
{ if (flag) { s.add(it) } else { s.remove(it) } return true } <v3>: {<: (String) -> Nothing} NEW: r({ if (flag) { s.add(it) } else { s.remove(it) } return true }) -> <v3>
|
||||
let { if (flag) { s.add(it) } else { s.remove(it) } return true } !<v4>: *
|
||||
name?.let { if (flag) { s.add(it) } else { s.remove(it) } return true } !<v4>: * COPY
|
||||
false <v5>: Boolean NEW: r(false) -> <v5>
|
||||
return false !<v6>: *
|
||||
{ name?.let { if (flag) { s.add(it) } else { s.remove(it) } return true } return false } !<v6>: * COPY
|
||||
try { name?.let { if (flag) { s.add(it) } else { s.remove(it) } return true } return false } finally { name?.hashCode() } <v7>: * NEW: merge(try { name?.let { if (flag) { s.add(it) } else { s.remove(it) } return true } return false } finally { name?.hashCode() }|!<v6>) -> <v7>
|
||||
{ try { name?.let { if (flag) { s.add(it) } else { s.remove(it) } return true } return false } finally { name?.hashCode() } } <v7>: * COPY
|
||||
=====================
|
||||
== inlined anonymous_0 ==
|
||||
{
|
||||
if (flag) {
|
||||
s.add(it)
|
||||
}
|
||||
else {
|
||||
s.remove(it)
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
||||
---------------------
|
||||
<v3>: * NEW: magic[VALUE_CONSUMER](it|<v2>) -> <v3>
|
||||
<v7>: * NEW: magic[VALUE_CONSUMER](it|<v6>) -> <v7>
|
||||
flag <v0>: Boolean NEW: r(flag) -> <v0>
|
||||
s <v1>: * NEW: r(s) -> <v1>
|
||||
it <v2>: * NEW: r(it) -> <v2>
|
||||
add(it) <v4>: * NEW: call(add(it), <ERROR FUNCTION>|<v1>) -> <v4>
|
||||
s.add(it) <v4>: * COPY
|
||||
{ s.add(it) } <v4>: * COPY
|
||||
s <v5>: * NEW: r(s) -> <v5>
|
||||
it <v6>: * NEW: r(it) -> <v6>
|
||||
remove(it) <v8>: * NEW: call(remove(it), <ERROR FUNCTION>|<v5>) -> <v8>
|
||||
s.remove(it) <v8>: * COPY
|
||||
{ s.remove(it) } <v8>: * COPY
|
||||
if (flag) { s.add(it) } else { s.remove(it) } <v9>: * NEW: merge(if (flag) { s.add(it) } else { s.remove(it) }|<v4>, <v8>) -> <v9>
|
||||
true <v10>: Boolean NEW: r(true) -> <v10>
|
||||
return true !<v13>: *
|
||||
if (flag) { s.add(it) } else { s.remove(it) } return true !<v13>: * COPY
|
||||
=====================
|
||||
@@ -0,0 +1,23 @@
|
||||
// !LANGUAGE: -ReadDeserializedContracts -UseCallsInPlaceEffect
|
||||
// See KT-18698
|
||||
|
||||
val s = mutableListOf<String>()
|
||||
|
||||
fun test(name: String?, flag: Boolean): Boolean {
|
||||
try {
|
||||
name?.let {
|
||||
if (flag) {
|
||||
s.add(it)
|
||||
}
|
||||
else {
|
||||
s.remove(it)
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
} finally {
|
||||
name?.hashCode()
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,206 @@
|
||||
== doCall ==
|
||||
inline fun doCall(f: () -> Unit) = f()
|
||||
---------------------
|
||||
L0:
|
||||
1 <START>
|
||||
v(f: () -> Unit)
|
||||
magic[FAKE_INITIALIZER](f: () -> Unit) -> <v0>
|
||||
w(f|<v0>)
|
||||
r(f) -> <v1>
|
||||
mark(f())
|
||||
call(f(), invoke|<v1>) -> <v2>
|
||||
ret(*|<v2>) L1
|
||||
L1:
|
||||
<END> NEXT:[<SINK>]
|
||||
error:
|
||||
<ERROR> PREV:[]
|
||||
sink:
|
||||
<SINK> PREV:[<ERROR>, <END>]
|
||||
=====================
|
||||
== test1 ==
|
||||
fun test1(nonLocal: String): String {
|
||||
val localResult = doCall {
|
||||
return nonLocal //unreachable
|
||||
}
|
||||
return "NON_LOCAL_FAILED $localResult" //unreachable
|
||||
}
|
||||
---------------------
|
||||
L0:
|
||||
1 <START>
|
||||
v(nonLocal: String)
|
||||
magic[FAKE_INITIALIZER](nonLocal: String) -> <v0>
|
||||
w(nonLocal|<v0>)
|
||||
2 mark({ val localResult = doCall { return nonLocal //unreachable } return "NON_LOCAL_FAILED $localResult" //unreachable })
|
||||
v(val localResult = doCall { return nonLocal //unreachable })
|
||||
mark({ return nonLocal //unreachable })
|
||||
jmp?(L2) NEXT:[r({ return nonLocal //unreachable }) -> <v1>, d({ return nonLocal //unreachable })]
|
||||
d({ return nonLocal //unreachable }) NEXT:[<SINK>]
|
||||
L2 [after local declaration]:
|
||||
r({ return nonLocal //unreachable }) -> <v1> PREV:[jmp?(L2)]
|
||||
mark(doCall { return nonLocal //unreachable })
|
||||
call(doCall { return nonLocal //unreachable }, doCall|<v1>) -> <v2>
|
||||
w(localResult|<v2>)
|
||||
mark("NON_LOCAL_FAILED $localResult")
|
||||
r(localResult) -> <v3>
|
||||
magic[STRING_TEMPLATE]("NON_LOCAL_FAILED $localResult"|<v3>) -> <v4>
|
||||
ret(*|<v4>) L1
|
||||
L1:
|
||||
1 <END> NEXT:[<SINK>] PREV:[ret(*|<v0>) L1, ret(*|<v4>) L1]
|
||||
error:
|
||||
<ERROR> PREV:[]
|
||||
sink:
|
||||
<SINK> PREV:[<ERROR>, <END>, d({ return nonLocal //unreachable })]
|
||||
=====================
|
||||
== anonymous_0 ==
|
||||
{
|
||||
return nonLocal //unreachable
|
||||
}
|
||||
---------------------
|
||||
L3:
|
||||
3 <START>
|
||||
4 mark(return nonLocal //unreachable)
|
||||
r(nonLocal) -> <v0>
|
||||
ret(*|<v0>) L1 NEXT:[<END>]
|
||||
L4:
|
||||
3 <END> NEXT:[<SINK>] PREV:[]
|
||||
error:
|
||||
<ERROR> PREV:[]
|
||||
sink:
|
||||
<SINK> PREV:[<ERROR>, <END>]
|
||||
=====================
|
||||
== doSomething ==
|
||||
fun doSomething() {}
|
||||
---------------------
|
||||
L0:
|
||||
1 <START>
|
||||
2 mark({})
|
||||
read (Unit)
|
||||
L1:
|
||||
1 <END> NEXT:[<SINK>]
|
||||
error:
|
||||
<ERROR> PREV:[]
|
||||
sink:
|
||||
<SINK> PREV:[<ERROR>, <END>]
|
||||
=====================
|
||||
== test2 ==
|
||||
fun test2() {
|
||||
fun f(x: Any?) = x
|
||||
f(null?.let { return })
|
||||
|
||||
// false unreachable here
|
||||
doSomething()
|
||||
}
|
||||
---------------------
|
||||
L0:
|
||||
1 <START>
|
||||
2 mark({ fun f(x: Any?) = x f(null?.let { return }) // false unreachable here doSomething() })
|
||||
jmp?(L2) NEXT:[mark(null?.let { return }), d(fun f(x: Any?) = x)]
|
||||
d(fun f(x: Any?) = x) NEXT:[<SINK>]
|
||||
L2 [after local declaration]:
|
||||
mark(null?.let { return }) PREV:[jmp?(L2)]
|
||||
jf(L5) NEXT:[mark(f(null?.let { return })), r(null) -> <v0>]
|
||||
r(null) -> <v0>
|
||||
mark({ return })
|
||||
r({ return }) -> <v1>
|
||||
mark(let { return })
|
||||
call(let { return }, let|<v0>, <v1>)
|
||||
L6 [before inlined declaration]:
|
||||
inlined({ return }) NEXT:[<SINK>]
|
||||
L5 [result of call]:
|
||||
L7 [after inlined declaration]:
|
||||
mark(f(null?.let { return })) PREV:[jf(L5)]
|
||||
call(f(null?.let { return }), f|!<v2>) -> <v3>
|
||||
mark(doSomething())
|
||||
call(doSomething(), doSomething) -> <v4>
|
||||
L1:
|
||||
1 <END> NEXT:[<SINK>] PREV:[ret L1, call(doSomething(), doSomething) -> <v4>]
|
||||
error:
|
||||
<ERROR> PREV:[]
|
||||
sink:
|
||||
<SINK> PREV:[<ERROR>, <END>, d(fun f(x: Any?) = x), inlined({ return })]
|
||||
=====================
|
||||
== f ==
|
||||
fun f(x: Any?) = x
|
||||
---------------------
|
||||
L3:
|
||||
3 <START>
|
||||
v(x: Any?)
|
||||
magic[FAKE_INITIALIZER](x: Any?) -> <v0>
|
||||
w(x|<v0>)
|
||||
r(x) -> <v1>
|
||||
ret(*|<v1>) L4
|
||||
L4:
|
||||
<END> NEXT:[<SINK>]
|
||||
error:
|
||||
<ERROR> PREV:[]
|
||||
sink:
|
||||
<SINK> PREV:[<ERROR>, <END>]
|
||||
=====================
|
||||
== inlined anonymous_1 ==
|
||||
{ return }
|
||||
---------------------
|
||||
L8:
|
||||
3 <START>
|
||||
4 mark(return)
|
||||
ret L1 NEXT:[<END>]
|
||||
- 3 ret(*|!<v0>) L9 PREV:[]
|
||||
L9:
|
||||
- <END> NEXT:[<SINK>] PREV:[]
|
||||
error:
|
||||
- <ERROR> PREV:[]
|
||||
sink:
|
||||
- <SINK> PREV:[]
|
||||
=====================
|
||||
== test3 ==
|
||||
fun test3(x: Any?): Boolean =
|
||||
x?.let {
|
||||
return true
|
||||
} ?: false
|
||||
---------------------
|
||||
L0:
|
||||
1 <START>
|
||||
v(x: Any?)
|
||||
magic[FAKE_INITIALIZER](x: Any?) -> <v0>
|
||||
w(x|<v0>)
|
||||
mark(x?.let { return true })
|
||||
jf(L2) NEXT:[mark(x?.let { return true } ?: false), r(x) -> <v1>]
|
||||
r(x) -> <v1>
|
||||
mark({ return true })
|
||||
r({ return true }) -> <v2>
|
||||
mark(let { return true })
|
||||
call(let { return true }, let|<v1>, <v2>)
|
||||
L3 [before inlined declaration]:
|
||||
inlined({ return true }) NEXT:[<SINK>]
|
||||
L2 [result of call]:
|
||||
L4 [after inlined declaration]:
|
||||
mark(x?.let { return true } ?: false) PREV:[jf(L2)]
|
||||
jt(L7|!<v3>) NEXT:[r(false) -> <v4>, merge(x?.let { return true } ?: false|!<v3>, <v4>) -> <v5>]
|
||||
r(false) -> <v4>
|
||||
L7 [after elvis operator]:
|
||||
merge(x?.let { return true } ?: false|!<v3>, <v4>) -> <v5> PREV:[jt(L7|!<v3>), r(false) -> <v4>]
|
||||
ret(*|<v5>) L1
|
||||
L1:
|
||||
<END> NEXT:[<SINK>] PREV:[ret(*|<v0>) L1, ret(*|<v5>) L1]
|
||||
error:
|
||||
<ERROR> PREV:[]
|
||||
sink:
|
||||
<SINK> PREV:[<ERROR>, <END>, inlined({ return true })]
|
||||
=====================
|
||||
== inlined anonymous_2 ==
|
||||
{
|
||||
return true
|
||||
}
|
||||
---------------------
|
||||
L5:
|
||||
2 <START>
|
||||
3 mark(return true)
|
||||
r(true) -> <v0>
|
||||
ret(*|<v0>) L1 NEXT:[<END>]
|
||||
- 2 ret(*|!<v1>) L6 PREV:[]
|
||||
L6:
|
||||
- <END> NEXT:[<SINK>] PREV:[]
|
||||
error:
|
||||
- <ERROR> PREV:[]
|
||||
sink:
|
||||
- <SINK> PREV:[]
|
||||
=====================
|
||||
+2
-1
@@ -1,3 +1,4 @@
|
||||
// !LANGUAGE: +ReadDeserializedContracts +UseCallsInPlaceEffect
|
||||
// See also KT-5198 / KT-10186
|
||||
|
||||
inline fun doCall(f: () -> Unit) = f()
|
||||
@@ -20,6 +21,6 @@ fun test2() {
|
||||
}
|
||||
|
||||
fun test3(x: Any?): Boolean =
|
||||
x?.let {
|
||||
x?.let {
|
||||
return true
|
||||
} ?: false
|
||||
@@ -0,0 +1,88 @@
|
||||
== doCall ==
|
||||
inline fun doCall(f: () -> Unit) = f()
|
||||
---------------------
|
||||
<v0>: {<: () -> Unit} NEW: magic[FAKE_INITIALIZER](f: () -> Unit) -> <v0>
|
||||
f <v1>: {<: () -> Unit} NEW: r(f) -> <v1>
|
||||
f() <v2>: Unit NEW: call(f(), invoke|<v1>) -> <v2>
|
||||
=====================
|
||||
== test1 ==
|
||||
fun test1(nonLocal: String): String {
|
||||
val localResult = doCall {
|
||||
return nonLocal //unreachable
|
||||
}
|
||||
return "NON_LOCAL_FAILED $localResult" //unreachable
|
||||
}
|
||||
---------------------
|
||||
<v0>: String NEW: magic[FAKE_INITIALIZER](nonLocal: String) -> <v0>
|
||||
{ return nonLocal //unreachable } <v1>: {<: () -> Unit} NEW: r({ return nonLocal //unreachable }) -> <v1>
|
||||
doCall { return nonLocal //unreachable } <v2>: Unit NEW: call(doCall { return nonLocal //unreachable }, doCall|<v1>) -> <v2>
|
||||
localResult <v3>: * NEW: r(localResult) -> <v3>
|
||||
"NON_LOCAL_FAILED $localResult" <v4>: String NEW: magic[STRING_TEMPLATE]("NON_LOCAL_FAILED $localResult"|<v3>) -> <v4>
|
||||
return "NON_LOCAL_FAILED $localResult" !<v5>: *
|
||||
{ val localResult = doCall { return nonLocal //unreachable } return "NON_LOCAL_FAILED $localResult" //unreachable } !<v5>: * COPY
|
||||
=====================
|
||||
== anonymous_0 ==
|
||||
{
|
||||
return nonLocal //unreachable
|
||||
}
|
||||
---------------------
|
||||
nonLocal <v0>: String NEW: r(nonLocal) -> <v0>
|
||||
return nonLocal !<v1>: *
|
||||
return nonLocal //unreachable !<v1>: * COPY
|
||||
=====================
|
||||
== doSomething ==
|
||||
fun doSomething() {}
|
||||
---------------------
|
||||
=====================
|
||||
== test2 ==
|
||||
fun test2() {
|
||||
fun f(x: Any?) = x
|
||||
f(null?.let { return })
|
||||
|
||||
// false unreachable here
|
||||
doSomething()
|
||||
}
|
||||
---------------------
|
||||
null <v0>: Nothing NEW: r(null) -> <v0>
|
||||
{ return } <v1>: {<: (Nothing) -> Nothing} NEW: r({ return }) -> <v1>
|
||||
let { return } !<v2>: *
|
||||
null?.let { return } !<v2>: * COPY
|
||||
f(null?.let { return }) <v3>: * NEW: call(f(null?.let { return }), f|!<v2>) -> <v3>
|
||||
doSomething() <v4>: * NEW: call(doSomething(), doSomething) -> <v4>
|
||||
{ fun f(x: Any?) = x f(null?.let { return }) // false unreachable here doSomething() } <v4>: * COPY
|
||||
=====================
|
||||
== f ==
|
||||
fun f(x: Any?) = x
|
||||
---------------------
|
||||
<v0>: * NEW: magic[FAKE_INITIALIZER](x: Any?) -> <v0>
|
||||
x <v1>: * NEW: r(x) -> <v1>
|
||||
=====================
|
||||
== inlined anonymous_1 ==
|
||||
{ return }
|
||||
---------------------
|
||||
return !<v0>: *
|
||||
return !<v0>: * COPY
|
||||
=====================
|
||||
== test3 ==
|
||||
fun test3(x: Any?): Boolean =
|
||||
x?.let {
|
||||
return true
|
||||
} ?: false
|
||||
---------------------
|
||||
<v0>: * NEW: magic[FAKE_INITIALIZER](x: Any?) -> <v0>
|
||||
x <v1>: {<: Any} NEW: r(x) -> <v1>
|
||||
{ return true } <v2>: {<: (Any) -> Nothing} NEW: r({ return true }) -> <v2>
|
||||
let { return true } !<v3>: *
|
||||
x?.let { return true } !<v3>: * COPY
|
||||
false <v4>: Boolean NEW: r(false) -> <v4>
|
||||
x?.let { return true } ?: false <v5>: Boolean NEW: merge(x?.let { return true } ?: false|!<v3>, <v4>) -> <v5>
|
||||
=====================
|
||||
== inlined anonymous_2 ==
|
||||
{
|
||||
return true
|
||||
}
|
||||
---------------------
|
||||
true <v0>: Boolean NEW: r(true) -> <v0>
|
||||
return true !<v1>: *
|
||||
return true !<v1>: * COPY
|
||||
=====================
|
||||
@@ -0,0 +1,26 @@
|
||||
// !LANGUAGE: -ReadDeserializedContracts -UseCallsInPlaceEffect
|
||||
// See also KT-5198 / KT-10186
|
||||
|
||||
inline fun doCall(f: () -> Unit) = f()
|
||||
|
||||
fun test1(nonLocal: String): String {
|
||||
val localResult = doCall {
|
||||
return nonLocal //unreachable
|
||||
}
|
||||
return "NON_LOCAL_FAILED $localResult" //unreachable
|
||||
}
|
||||
|
||||
fun doSomething() {}
|
||||
|
||||
fun test2() {
|
||||
fun f(x: Any?) = x
|
||||
f(null?.let { return })
|
||||
|
||||
// false unreachable here
|
||||
doSomething()
|
||||
}
|
||||
|
||||
fun test3(x: Any?): Boolean =
|
||||
x?.let {
|
||||
return true
|
||||
} ?: false
|
||||
+2
@@ -1,3 +1,5 @@
|
||||
// !LANGUAGE: -RestrictionOfValReassignmentViaBackingField
|
||||
|
||||
val my: Int = 1
|
||||
get() {
|
||||
<!VAL_REASSIGNMENT_VIA_BACKING_FIELD!>field<!>++
|
||||
+50
@@ -0,0 +1,50 @@
|
||||
// !LANGUAGE: +NestedClassesInEnumEntryShouldBeInner
|
||||
|
||||
package a
|
||||
|
||||
|
||||
enum class C {
|
||||
E1, E2, E3 {
|
||||
<!NESTED_CLASS_NOT_ALLOWED!>object O_O<!>
|
||||
|
||||
fun b() {
|
||||
O_O
|
||||
}
|
||||
|
||||
<!NESTED_CLASS_NOT_ALLOWED!>class G<!>
|
||||
},
|
||||
|
||||
E4 {
|
||||
fun c() {
|
||||
this.B()
|
||||
|
||||
C.A()
|
||||
A()
|
||||
//TODO: should be resolved with error
|
||||
this.<!UNRESOLVED_REFERENCE!>A<!>()
|
||||
}
|
||||
};
|
||||
|
||||
class A
|
||||
inner class B
|
||||
object O {
|
||||
object InO
|
||||
}
|
||||
}
|
||||
|
||||
fun f() {
|
||||
C.E1.<!UNRESOLVED_REFERENCE!>A<!>
|
||||
C.E1.<!UNRESOLVED_REFERENCE!>A<!>()
|
||||
C.E2.B()
|
||||
|
||||
C.E2.<!UNRESOLVED_REFERENCE!>O<!>
|
||||
C.E3.<!UNRESOLVED_REFERENCE!>O<!>.<!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>InO<!>
|
||||
|
||||
C.O
|
||||
C.O.InO
|
||||
C.A()
|
||||
C.<!RESOLUTION_TO_CLASSIFIER!>B<!>()
|
||||
|
||||
C.E3.<!UNRESOLVED_REFERENCE!>O_O<!>
|
||||
C.E3.<!UNRESOLVED_REFERENCE!>G<!>()
|
||||
}
|
||||
+2
@@ -1,3 +1,5 @@
|
||||
// !LANGUAGE: -NestedClassesInEnumEntryShouldBeInner
|
||||
|
||||
package a
|
||||
|
||||
|
||||
+58
@@ -0,0 +1,58 @@
|
||||
package
|
||||
|
||||
package a {
|
||||
public fun f(): kotlin.Unit
|
||||
|
||||
public final enum class C : kotlin.Enum<a.C> {
|
||||
enum entry E1
|
||||
|
||||
enum entry E2
|
||||
|
||||
enum entry E3
|
||||
|
||||
enum entry E4
|
||||
|
||||
private constructor C()
|
||||
public final override /*1*/ /*fake_override*/ val name: kotlin.String
|
||||
public final override /*1*/ /*fake_override*/ val ordinal: kotlin.Int
|
||||
protected final override /*1*/ /*fake_override*/ fun clone(): kotlin.Any
|
||||
public final override /*1*/ /*fake_override*/ fun compareTo(/*0*/ other: a.C): kotlin.Int
|
||||
public final override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
protected/*protected and package*/ final override /*1*/ /*fake_override*/ /*isHiddenForResolutionEverywhereBesideSupercalls*/ fun finalize(): kotlin.Unit
|
||||
public final override /*1*/ /*fake_override*/ /*isHiddenForResolutionEverywhereBesideSupercalls*/ fun getDeclaringClass(): java.lang.Class<a.C!>!
|
||||
public final override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
public final class A {
|
||||
public constructor A()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public final inner class B {
|
||||
public constructor B()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public object O {
|
||||
private constructor O()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
public object InO {
|
||||
private constructor InO()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
}
|
||||
|
||||
// Static members
|
||||
public final /*synthesized*/ fun valueOf(/*0*/ value: kotlin.String): a.C
|
||||
public final /*synthesized*/ fun values(): kotlin.Array<a.C>
|
||||
}
|
||||
}
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
// !LANGUAGE: +RestrictionOfValReassignmentViaBackingField
|
||||
|
||||
package a
|
||||
|
||||
import java.util.HashSet
|
||||
|
||||
val a: MutableSet<String>? = null
|
||||
get() {
|
||||
if (a == null) {
|
||||
<!VAL_REASSIGNMENT_VIA_BACKING_FIELD_ERROR!>field<!> = HashSet()
|
||||
}
|
||||
return a
|
||||
}
|
||||
|
||||
class R {
|
||||
val b: String? = null
|
||||
get() {
|
||||
if (b == null) {
|
||||
<!VAL_REASSIGNMENT_VIA_BACKING_FIELD_ERROR!>field<!> = "b"
|
||||
}
|
||||
return b
|
||||
}
|
||||
}
|
||||
+2
-1
@@ -1,3 +1,5 @@
|
||||
// !LANGUAGE: -RestrictionOfValReassignmentViaBackingField
|
||||
|
||||
package a
|
||||
|
||||
import java.util.HashSet
|
||||
@@ -19,4 +21,3 @@ class R {
|
||||
return b
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+13
@@ -0,0 +1,13 @@
|
||||
package
|
||||
|
||||
package a {
|
||||
public val a: kotlin.collections.MutableSet<kotlin.String>? = null
|
||||
|
||||
public final class R {
|
||||
public constructor R()
|
||||
public final val b: kotlin.String? = null
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
// !LANGUAGE: +ReadDeserializedContracts +UseCallsInPlaceEffect
|
||||
// See KT-17479
|
||||
|
||||
class Test {
|
||||
val str: String
|
||||
init {
|
||||
run {
|
||||
this@Test.str = "A"
|
||||
}
|
||||
|
||||
run {
|
||||
// Not sure do we need diagnostic also here
|
||||
<!VAL_REASSIGNMENT!>this@Test.str<!> = "B"
|
||||
}
|
||||
|
||||
str = "C"
|
||||
}
|
||||
}
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
// !LANGUAGE: -ReadDeserializedContracts -UseCallsInPlaceEffect
|
||||
// See KT-17479
|
||||
|
||||
class Test {
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
package
|
||||
|
||||
public final class Test {
|
||||
public constructor Test()
|
||||
public final val str: kotlin.String
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
Vendored
+15
@@ -0,0 +1,15 @@
|
||||
// !LANGUAGE: +ProhibitVisibilityOfNestedClassifiersFromSupertypesOfCompanion
|
||||
// see https://youtrack.jetbrains.com/issue/KT-21515
|
||||
|
||||
open class Container {
|
||||
open class <!CYCLIC_SCOPES_WITH_COMPANION!>Base<!> {
|
||||
open fun m() {}
|
||||
}
|
||||
|
||||
// note that Base() supertype will be resolved in scope that was created on recursion
|
||||
abstract class <!CYCLIC_SCOPES_WITH_COMPANION!>DerivedAbstract<!> : Base()
|
||||
|
||||
companion <!CYCLIC_SCOPES_WITH_COMPANION!>object<!> : DerivedAbstract() {
|
||||
override fun m() {}
|
||||
}
|
||||
}
|
||||
Vendored
+32
@@ -0,0 +1,32 @@
|
||||
package
|
||||
|
||||
public open class Container {
|
||||
public constructor Container()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
public open class Base {
|
||||
public constructor Base()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open fun m(): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public companion object Companion : Container.DerivedAbstract {
|
||||
private constructor Companion()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ fun m(): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public abstract class DerivedAbstract : Container.Base {
|
||||
public constructor DerivedAbstract()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun m(): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
}
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
// !LANGUAGE: -ProhibitVisibilityOfNestedClassifiersFromSupertypesOfCompanion
|
||||
// see https://youtrack.jetbrains.com/issue/KT-21515
|
||||
|
||||
open class Container {
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
// !LANGUAGE: +ProhibitVisibilityOfNestedClassifiersFromSupertypesOfCompanion
|
||||
// see https://youtrack.jetbrains.com/issue/KT-21515
|
||||
|
||||
abstract class <!CYCLIC_SCOPES_WITH_COMPANION!>DerivedAbstract<!> : C.Base() {
|
||||
open class Data
|
||||
}
|
||||
|
||||
public class C {
|
||||
|
||||
open class <!CYCLIC_SCOPES_WITH_COMPANION!>Base<!> ()
|
||||
|
||||
class Foo : <!UNRESOLVED_REFERENCE!>Data<!>()
|
||||
|
||||
companion <!CYCLIC_SCOPES_WITH_COMPANION!>object<!> : DerivedAbstract()
|
||||
}
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
package
|
||||
|
||||
public final class C {
|
||||
public constructor C()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
public open class Base {
|
||||
public constructor Base()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public companion object Companion : DerivedAbstract {
|
||||
private constructor Companion()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public final class Foo {
|
||||
public constructor Foo()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
}
|
||||
|
||||
public abstract class DerivedAbstract : C.Base {
|
||||
public constructor DerivedAbstract()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
public open class Data {
|
||||
public constructor Data()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
}
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
// !LANGUAGE: -ProhibitVisibilityOfNestedClassifiersFromSupertypesOfCompanion
|
||||
// see https://youtrack.jetbrains.com/issue/KT-21515
|
||||
|
||||
abstract class <!CYCLIC_SCOPES_WITH_COMPANION!>DerivedAbstract<!> : C.Base() {
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
// !LANGUAGE: +ProhibitVisibilityOfNestedClassifiersFromSupertypesOfCompanion
|
||||
// see https://youtrack.jetbrains.com/issue/KT-21515
|
||||
|
||||
open class Container {
|
||||
// Note that here we also have errors and diagnostics, even though there are actually no loops.
|
||||
// (this is case because we can't know if there are any loops without resolving, but resolving
|
||||
// itself provokes loops)
|
||||
|
||||
interface <!CYCLIC_SCOPES_WITH_COMPANION!>Base<!> {
|
||||
open fun m() {}
|
||||
}
|
||||
|
||||
interface <!CYCLIC_SCOPES_WITH_COMPANION!>DerivedAbstract<!> : Base
|
||||
|
||||
companion <!CYCLIC_SCOPES_WITH_COMPANION!>object<!> : DerivedAbstract {
|
||||
override fun m() {}
|
||||
}
|
||||
}
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
package
|
||||
|
||||
public open class Container {
|
||||
public constructor Container()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
public interface Base {
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open fun m(): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public companion object Companion : Container.DerivedAbstract {
|
||||
private constructor Companion()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ fun m(): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public interface DerivedAbstract : Container.Base {
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun m(): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
}
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
// !LANGUAGE: -ProhibitVisibilityOfNestedClassifiersFromSupertypesOfCompanion
|
||||
// see https://youtrack.jetbrains.com/issue/KT-21515
|
||||
|
||||
open class Container {
|
||||
Vendored
+20
@@ -0,0 +1,20 @@
|
||||
// !LANGUAGE: +ProhibitVisibilityOfNestedClassifiersFromSupertypesOfCompanion
|
||||
// see https://youtrack.jetbrains.com/issue/KT-21515
|
||||
|
||||
interface SomeIrrelevantInterface
|
||||
|
||||
// note that C.Base() supertype will be resolved in normal scope
|
||||
abstract class <!CYCLIC_SCOPES_WITH_COMPANION!>DerivedAbstract<!> : C.Base()
|
||||
|
||||
class Data
|
||||
|
||||
public class C {
|
||||
|
||||
val data: Data = Data()
|
||||
|
||||
// Note that any supertype of Base will be resolved in error-scope, even if it absolutely irrelevant
|
||||
// to the types in cycle.
|
||||
open class <!CYCLIC_SCOPES_WITH_COMPANION!>Base<!>() : SomeIrrelevantInterface
|
||||
|
||||
companion <!CYCLIC_SCOPES_WITH_COMPANION!>object<!> : DerivedAbstract()
|
||||
}
|
||||
Vendored
+43
@@ -0,0 +1,43 @@
|
||||
package
|
||||
|
||||
public final class C {
|
||||
public constructor C()
|
||||
public final val data: Data
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
public open class Base : SomeIrrelevantInterface {
|
||||
public constructor Base()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public companion object Companion : DerivedAbstract {
|
||||
private constructor Companion()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
}
|
||||
|
||||
public final class Data {
|
||||
public constructor Data()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public abstract class DerivedAbstract : C.Base {
|
||||
public constructor DerivedAbstract()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public interface SomeIrrelevantInterface {
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
// !LANGUAGE: -ProhibitVisibilityOfNestedClassifiersFromSupertypesOfCompanion
|
||||
// see https://youtrack.jetbrains.com/issue/KT-21515
|
||||
|
||||
interface SomeIrrelevantInterface
|
||||
+58
@@ -0,0 +1,58 @@
|
||||
// !LANGUAGE: +ProhibitVisibilityOfNestedClassifiersFromSupertypesOfCompanion
|
||||
// see https://youtrack.jetbrains.com/issue/KT-21515
|
||||
|
||||
object WithFunctionInBase {
|
||||
abstract class <!CYCLIC_SCOPES_WITH_COMPANION!>DerivedAbstract<!> : C.Base()
|
||||
|
||||
class Data
|
||||
|
||||
public class C {
|
||||
val data: Data = Data()
|
||||
|
||||
open class <!CYCLIC_SCOPES_WITH_COMPANION!>Base<!>() {
|
||||
fun foo(): Int = 42
|
||||
}
|
||||
|
||||
companion <!CYCLIC_SCOPES_WITH_COMPANION!>object<!> : DerivedAbstract()
|
||||
}
|
||||
}
|
||||
|
||||
object WithPropertyInBase {
|
||||
// This case is very similar to previous one, but there are subtle differences from POV of implementation
|
||||
|
||||
abstract class <!CYCLIC_SCOPES_WITH_COMPANION!>DerivedAbstract<!> : C.Base()
|
||||
|
||||
class Data
|
||||
|
||||
public class C {
|
||||
|
||||
open class <!CYCLIC_SCOPES_WITH_COMPANION!>Base<!>() {
|
||||
val foo: Int = 42
|
||||
}
|
||||
|
||||
val data: Data = Data()
|
||||
|
||||
companion <!CYCLIC_SCOPES_WITH_COMPANION!>object<!> : DerivedAbstract()
|
||||
}
|
||||
}
|
||||
|
||||
object WithPropertyInBaseDifferentOrder {
|
||||
// This case is very similar to previous one, but there are subtle differences from POV of implementation
|
||||
// Note how position of property in file affected order of resolve, and, consequently, its results and
|
||||
// diagnostics.
|
||||
|
||||
abstract class <!CYCLIC_SCOPES_WITH_COMPANION!>DerivedAbstract<!> : C.Base()
|
||||
|
||||
class Data
|
||||
|
||||
public class C {
|
||||
val data: Data = Data()
|
||||
|
||||
open class <!CYCLIC_SCOPES_WITH_COMPANION!>Base<!>() {
|
||||
val foo: Int = 42
|
||||
|
||||
}
|
||||
|
||||
companion <!CYCLIC_SCOPES_WITH_COMPANION!>object<!> : DerivedAbstract()
|
||||
}
|
||||
}
|
||||
+139
@@ -0,0 +1,139 @@
|
||||
package
|
||||
|
||||
public object WithFunctionInBase {
|
||||
private constructor WithFunctionInBase()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
public final class C {
|
||||
public constructor C()
|
||||
public final val data: WithFunctionInBase.Data
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
public open class Base {
|
||||
public constructor Base()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public final fun foo(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public companion object Companion : WithFunctionInBase.DerivedAbstract {
|
||||
private constructor Companion()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public final override /*1*/ /*fake_override*/ fun foo(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
}
|
||||
|
||||
public final class Data {
|
||||
public constructor Data()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public abstract class DerivedAbstract : WithFunctionInBase.C.Base {
|
||||
public constructor DerivedAbstract()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public final override /*1*/ /*fake_override*/ fun foo(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
}
|
||||
|
||||
public object WithPropertyInBase {
|
||||
private constructor WithPropertyInBase()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
public final class C {
|
||||
public constructor C()
|
||||
public final val data: WithPropertyInBase.Data
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
public open class Base {
|
||||
public constructor Base()
|
||||
public final val foo: kotlin.Int = 42
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public companion object Companion : WithPropertyInBase.DerivedAbstract {
|
||||
private constructor Companion()
|
||||
public final override /*1*/ /*fake_override*/ val foo: kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
}
|
||||
|
||||
public final class Data {
|
||||
public constructor Data()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public abstract class DerivedAbstract : WithPropertyInBase.C.Base {
|
||||
public constructor DerivedAbstract()
|
||||
public final override /*1*/ /*fake_override*/ val foo: kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
}
|
||||
|
||||
public object WithPropertyInBaseDifferentOrder {
|
||||
private constructor WithPropertyInBaseDifferentOrder()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
public final class C {
|
||||
public constructor C()
|
||||
public final val data: WithPropertyInBaseDifferentOrder.Data
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
public open class Base {
|
||||
public constructor Base()
|
||||
public final val foo: kotlin.Int = 42
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public companion object Companion : WithPropertyInBaseDifferentOrder.DerivedAbstract {
|
||||
private constructor Companion()
|
||||
public final override /*1*/ /*fake_override*/ val foo: kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
}
|
||||
|
||||
public final class Data {
|
||||
public constructor Data()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public abstract class DerivedAbstract : WithPropertyInBaseDifferentOrder.C.Base {
|
||||
public constructor DerivedAbstract()
|
||||
public final override /*1*/ /*fake_override*/ val foo: kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
}
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
// !LANGUAGE: -ProhibitVisibilityOfNestedClassifiersFromSupertypesOfCompanion
|
||||
// see https://youtrack.jetbrains.com/issue/KT-21515
|
||||
|
||||
object WithFunctionInBase {
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
// !LANGUAGE: +NestedClassesInEnumEntryShouldBeInner
|
||||
|
||||
enum class E {
|
||||
FIRST,
|
||||
SECOND {
|
||||
<!NESTED_CLASS_NOT_ALLOWED!>class A<!>
|
||||
};
|
||||
}
|
||||
|
||||
val foo: Any.() -> Unit = {}
|
||||
|
||||
fun f1() = E.FIRST.foo()
|
||||
fun f2() = E.FIRST.(foo)()
|
||||
fun f3() = E.SECOND.foo()
|
||||
fun f4() = E.SECOND.(foo)()
|
||||
fun f5() = E.SECOND.<!UNRESOLVED_REFERENCE!>A<!>()
|
||||
+2
@@ -1,3 +1,5 @@
|
||||
// !LANGUAGE: -NestedClassesInEnumEntryShouldBeInner
|
||||
|
||||
enum class E {
|
||||
FIRST,
|
||||
SECOND {
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
package
|
||||
|
||||
public val foo: kotlin.Any.() -> kotlin.Unit
|
||||
public fun f1(): kotlin.Unit
|
||||
public fun f2(): kotlin.Unit
|
||||
public fun f3(): kotlin.Unit
|
||||
public fun f4(): kotlin.Unit
|
||||
public fun f5(): [ERROR : Error function type]
|
||||
|
||||
public final enum class E : kotlin.Enum<E> {
|
||||
enum entry FIRST
|
||||
|
||||
enum entry SECOND
|
||||
|
||||
private constructor E()
|
||||
public final override /*1*/ /*fake_override*/ val name: kotlin.String
|
||||
public final override /*1*/ /*fake_override*/ val ordinal: kotlin.Int
|
||||
protected final override /*1*/ /*fake_override*/ fun clone(): kotlin.Any
|
||||
public final override /*1*/ /*fake_override*/ fun compareTo(/*0*/ other: E): kotlin.Int
|
||||
public final override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
protected/*protected and package*/ final override /*1*/ /*fake_override*/ /*isHiddenForResolutionEverywhereBesideSupercalls*/ fun finalize(): kotlin.Unit
|
||||
public final override /*1*/ /*fake_override*/ /*isHiddenForResolutionEverywhereBesideSupercalls*/ fun getDeclaringClass(): java.lang.Class<E!>!
|
||||
public final override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
// Static members
|
||||
public final /*synthesized*/ fun valueOf(/*0*/ value: kotlin.String): E
|
||||
public final /*synthesized*/ fun values(): kotlin.Array<E>
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
// !LANGUAGE: +NestedClassesInEnumEntryShouldBeInner
|
||||
|
||||
enum class E {
|
||||
ABC {
|
||||
<!NESTED_CLASS_NOT_ALLOWED!>enum class F<!> {
|
||||
DEF
|
||||
}
|
||||
}
|
||||
}
|
||||
+2
@@ -1,3 +1,5 @@
|
||||
// !LANGUAGE: -NestedClassesInEnumEntryShouldBeInner
|
||||
|
||||
enum class E {
|
||||
ABC {
|
||||
<!NESTED_CLASS_DEPRECATED!>enum class F<!> {
|
||||
@@ -0,0 +1,20 @@
|
||||
package
|
||||
|
||||
public final enum class E : kotlin.Enum<E> {
|
||||
enum entry ABC
|
||||
|
||||
private constructor E()
|
||||
public final override /*1*/ /*fake_override*/ val name: kotlin.String
|
||||
public final override /*1*/ /*fake_override*/ val ordinal: kotlin.Int
|
||||
protected final override /*1*/ /*fake_override*/ fun clone(): kotlin.Any
|
||||
public final override /*1*/ /*fake_override*/ fun compareTo(/*0*/ other: E): kotlin.Int
|
||||
public final override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
protected/*protected and package*/ final override /*1*/ /*fake_override*/ /*isHiddenForResolutionEverywhereBesideSupercalls*/ fun finalize(): kotlin.Unit
|
||||
public final override /*1*/ /*fake_override*/ /*isHiddenForResolutionEverywhereBesideSupercalls*/ fun getDeclaringClass(): java.lang.Class<E!>!
|
||||
public final override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
// Static members
|
||||
public final /*synthesized*/ fun valueOf(/*0*/ value: kotlin.String): E
|
||||
public final /*synthesized*/ fun values(): kotlin.Array<E>
|
||||
}
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
// !LANGUAGE: +ProhibitVisibilityOfNestedClassifiersFromSupertypesOfCompanion
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_VARIABLE
|
||||
open class Outer<E> {
|
||||
inner class Inner<F>
|
||||
|
||||
}
|
||||
|
||||
class Derived : Outer<String>() {
|
||||
// Inner<Int> here means Outer<String>.Inner<Int>
|
||||
fun foo(x: Inner<Int>) {}
|
||||
}
|
||||
|
||||
class A {
|
||||
companion object : Outer<String>()
|
||||
|
||||
// Does not work, could be Outer<String>.Inner<Int>
|
||||
// TODO: Should work?
|
||||
fun foo(x: <!UNRESOLVED_REFERENCE!>Inner<!><Int>) {
|
||||
// Inner<Char>() call use companion as implicit receiver
|
||||
val y: Outer<String>.Inner<Char> = Inner<Char>()
|
||||
}
|
||||
}
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
package
|
||||
|
||||
public final class A {
|
||||
public constructor A()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public final fun foo(/*0*/ x: [ERROR : Inner<Int>]<kotlin.Int>): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
public companion object Companion : Outer<kotlin.String> {
|
||||
private constructor Companion()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
}
|
||||
|
||||
public final class Derived : Outer<kotlin.String> {
|
||||
public constructor Derived()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public final fun foo(/*0*/ x: Outer<kotlin.String>.Inner<kotlin.Int>): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public open class Outer</*0*/ E> {
|
||||
public constructor Outer</*0*/ E>()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
public final inner class Inner</*0*/ F> /*captured type parameters: /*1*/ E*/ {
|
||||
public constructor Inner</*0*/ F>()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
}
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
// !LANGUAGE: -ProhibitVisibilityOfNestedClassifiersFromSupertypesOfCompanion
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER -UNUSED_VARIABLE
|
||||
open class Outer<E> {
|
||||
inner class Inner<F>
|
||||
@@ -0,0 +1,26 @@
|
||||
// !LANGUAGE: +NestedClassesInEnumEntryShouldBeInner
|
||||
|
||||
class A {
|
||||
inner class B {
|
||||
<!NESTED_CLASS_NOT_ALLOWED!>class C<!>
|
||||
}
|
||||
|
||||
fun foo() {
|
||||
class B {
|
||||
<!NESTED_CLASS_NOT_ALLOWED!>class C<!>
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun foo() {
|
||||
class B {
|
||||
<!NESTED_CLASS_NOT_ALLOWED!>class C<!>
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
enum class E {
|
||||
E1 {
|
||||
<!NESTED_CLASS_NOT_ALLOWED!>class D<!>
|
||||
}
|
||||
}
|
||||
+2
-1
@@ -1,3 +1,5 @@
|
||||
// !LANGUAGE: -NestedClassesInEnumEntryShouldBeInner
|
||||
|
||||
class A {
|
||||
inner class B {
|
||||
<!NESTED_CLASS_NOT_ALLOWED!>class C<!>
|
||||
@@ -19,7 +21,6 @@ fun foo() {
|
||||
|
||||
enum class E {
|
||||
E1 {
|
||||
// Not allowed in Java, but no reason to disallow in Kotlin
|
||||
<!NESTED_CLASS_DEPRECATED!>class D<!>
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
package
|
||||
|
||||
public fun foo(): kotlin.Unit
|
||||
|
||||
public final class A {
|
||||
public constructor A()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public final fun foo(): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
public final inner class B {
|
||||
public constructor B()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
public final class C {
|
||||
public constructor C()
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public final enum class E : kotlin.Enum<E> {
|
||||
enum entry E1
|
||||
|
||||
private constructor E()
|
||||
public final override /*1*/ /*fake_override*/ val name: kotlin.String
|
||||
public final override /*1*/ /*fake_override*/ val ordinal: kotlin.Int
|
||||
protected final override /*1*/ /*fake_override*/ fun clone(): kotlin.Any
|
||||
public final override /*1*/ /*fake_override*/ fun compareTo(/*0*/ other: E): kotlin.Int
|
||||
public final override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
protected/*protected and package*/ final override /*1*/ /*fake_override*/ /*isHiddenForResolutionEverywhereBesideSupercalls*/ fun finalize(): kotlin.Unit
|
||||
public final override /*1*/ /*fake_override*/ /*isHiddenForResolutionEverywhereBesideSupercalls*/ fun getDeclaringClass(): java.lang.Class<E!>!
|
||||
public final override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
|
||||
// Static members
|
||||
public final /*synthesized*/ fun valueOf(/*0*/ value: kotlin.String): E
|
||||
public final /*synthesized*/ fun values(): kotlin.Array<E>
|
||||
}
|
||||
@@ -222,9 +222,14 @@ public class ControlFlowTestGenerated extends AbstractControlFlowTest {
|
||||
runTest("compiler/testData/cfg/controlStructures/If.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("incorrectIndex.kt")
|
||||
public void testIncorrectIndex() throws Exception {
|
||||
runTest("compiler/testData/cfg/controlStructures/incorrectIndex.kt");
|
||||
@TestMetadata("incorrectIndex_After.kt")
|
||||
public void testIncorrectIndex_After() throws Exception {
|
||||
runTest("compiler/testData/cfg/controlStructures/incorrectIndex_After.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("incorrectIndex_Before.kt")
|
||||
public void testIncorrectIndex_Before() throws Exception {
|
||||
runTest("compiler/testData/cfg/controlStructures/incorrectIndex_Before.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("InfiniteLoops.kt")
|
||||
@@ -318,9 +323,14 @@ public class ControlFlowTestGenerated extends AbstractControlFlowTest {
|
||||
runTest("compiler/testData/cfg/deadCode/DeadCode.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("notLocalReturn.kt")
|
||||
public void testNotLocalReturn() throws Exception {
|
||||
runTest("compiler/testData/cfg/deadCode/notLocalReturn.kt");
|
||||
@TestMetadata("notLocalReturn_after.kt")
|
||||
public void testNotLocalReturn_after() throws Exception {
|
||||
runTest("compiler/testData/cfg/deadCode/notLocalReturn_after.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("notLocalReturn_before.kt")
|
||||
public void testNotLocalReturn_before() throws Exception {
|
||||
runTest("compiler/testData/cfg/deadCode/notLocalReturn_before.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("returnInElvis.kt")
|
||||
|
||||
@@ -222,9 +222,14 @@ public class PseudoValueTestGenerated extends AbstractPseudoValueTest {
|
||||
runTest("compiler/testData/cfg/controlStructures/If.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("incorrectIndex.kt")
|
||||
public void testIncorrectIndex() throws Exception {
|
||||
runTest("compiler/testData/cfg/controlStructures/incorrectIndex.kt");
|
||||
@TestMetadata("incorrectIndex_After.kt")
|
||||
public void testIncorrectIndex_After() throws Exception {
|
||||
runTest("compiler/testData/cfg/controlStructures/incorrectIndex_After.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("incorrectIndex_Before.kt")
|
||||
public void testIncorrectIndex_Before() throws Exception {
|
||||
runTest("compiler/testData/cfg/controlStructures/incorrectIndex_Before.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("InfiniteLoops.kt")
|
||||
@@ -318,9 +323,14 @@ public class PseudoValueTestGenerated extends AbstractPseudoValueTest {
|
||||
runTest("compiler/testData/cfg/deadCode/DeadCode.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("notLocalReturn.kt")
|
||||
public void testNotLocalReturn() throws Exception {
|
||||
runTest("compiler/testData/cfg/deadCode/notLocalReturn.kt");
|
||||
@TestMetadata("notLocalReturn_after.kt")
|
||||
public void testNotLocalReturn_after() throws Exception {
|
||||
runTest("compiler/testData/cfg/deadCode/notLocalReturn_after.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("notLocalReturn_before.kt")
|
||||
public void testNotLocalReturn_before() throws Exception {
|
||||
runTest("compiler/testData/cfg/deadCode/notLocalReturn_before.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("returnInElvis.kt")
|
||||
|
||||
+102
-42
@@ -1568,14 +1568,14 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest {
|
||||
runTest("compiler/testData/diagnostics/tests/backingField/FieldOnVar.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("FieldReassignment.kt")
|
||||
public void testFieldReassignment() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/backingField/FieldReassignment.kt");
|
||||
@TestMetadata("FieldReassignment_after.kt")
|
||||
public void testFieldReassignment_after() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/backingField/FieldReassignment_after.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("FieldReassignmentError.kt")
|
||||
public void testFieldReassignmentError() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/backingField/FieldReassignmentError.kt");
|
||||
@TestMetadata("FieldReassignment_before.kt")
|
||||
public void testFieldReassignment_before() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/backingField/FieldReassignment_before.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("FieldShadow.kt")
|
||||
@@ -3044,9 +3044,14 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest {
|
||||
runTest("compiler/testData/diagnostics/tests/classObjects/InnerClassAccessThroughClassObject.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("InnerClassAccessThroughEnum.kt")
|
||||
public void testInnerClassAccessThroughEnum() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/classObjects/InnerClassAccessThroughEnum.kt");
|
||||
@TestMetadata("InnerClassAccessThroughEnum_after.kt")
|
||||
public void testInnerClassAccessThroughEnum_after() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/classObjects/InnerClassAccessThroughEnum_after.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("InnerClassAccessThroughEnum_before.kt")
|
||||
public void testInnerClassAccessThroughEnum_before() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/classObjects/InnerClassAccessThroughEnum_before.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("InnerClassClassObject.kt")
|
||||
@@ -3313,9 +3318,14 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest {
|
||||
runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/assignmentInLocalsInConstructor.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("backingFieldInsideGetter.kt")
|
||||
public void testBackingFieldInsideGetter() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/backingFieldInsideGetter.kt");
|
||||
@TestMetadata("backingFieldInsideGetter_after.kt")
|
||||
public void testBackingFieldInsideGetter_after() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/backingFieldInsideGetter_after.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("backingFieldInsideGetter_before.kt")
|
||||
public void testBackingFieldInsideGetter_before() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/backingFieldInsideGetter_before.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("breakContinueInTryFinally.kt")
|
||||
@@ -3408,9 +3418,14 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest {
|
||||
runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/initializationInLocalFun.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("initializationInLocalViaExplicitThis.kt")
|
||||
public void testInitializationInLocalViaExplicitThis() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/initializationInLocalViaExplicitThis.kt");
|
||||
@TestMetadata("initializationInLocalViaExplicitThis_after.kt")
|
||||
public void testInitializationInLocalViaExplicitThis_after() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/initializationInLocalViaExplicitThis_after.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("initializationInLocalViaExplicitThis_before.kt")
|
||||
public void testInitializationInLocalViaExplicitThis_before() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/initializationInLocalViaExplicitThis_before.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt1001.kt")
|
||||
@@ -4250,19 +4265,34 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/cyclicHierarchy/withCompanion"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
|
||||
}
|
||||
|
||||
@TestMetadata("everythingInOneScope.kt")
|
||||
public void testEverythingInOneScope() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/cyclicHierarchy/withCompanion/everythingInOneScope.kt");
|
||||
@TestMetadata("everythingInOneScope_after.kt")
|
||||
public void testEverythingInOneScope_after() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/cyclicHierarchy/withCompanion/everythingInOneScope_after.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("noMembers.kt")
|
||||
public void testNoMembers() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/cyclicHierarchy/withCompanion/noMembers.kt");
|
||||
@TestMetadata("everythingInOneScope_before.kt")
|
||||
public void testEverythingInOneScope_before() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/cyclicHierarchy/withCompanion/everythingInOneScope_before.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("onlyInterfaces.kt")
|
||||
public void testOnlyInterfaces() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/cyclicHierarchy/withCompanion/onlyInterfaces.kt");
|
||||
@TestMetadata("noMembers_after.kt")
|
||||
public void testNoMembers_after() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/cyclicHierarchy/withCompanion/noMembers_after.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("noMembers_before.kt")
|
||||
public void testNoMembers_before() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/cyclicHierarchy/withCompanion/noMembers_before.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("onlyInterfaces_after.kt")
|
||||
public void testOnlyInterfaces_after() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/cyclicHierarchy/withCompanion/onlyInterfaces_after.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("onlyInterfaces_before.kt")
|
||||
public void testOnlyInterfaces_before() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/cyclicHierarchy/withCompanion/onlyInterfaces_before.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("typeIsLowEnough.kt")
|
||||
@@ -4270,14 +4300,24 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest {
|
||||
runTest("compiler/testData/diagnostics/tests/cyclicHierarchy/withCompanion/typeIsLowEnough.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("withIrrelevantInterface.kt")
|
||||
public void testWithIrrelevantInterface() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/cyclicHierarchy/withCompanion/withIrrelevantInterface.kt");
|
||||
@TestMetadata("withIrrelevantInterface_after.kt")
|
||||
public void testWithIrrelevantInterface_after() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/cyclicHierarchy/withCompanion/withIrrelevantInterface_after.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("withMembers.kt")
|
||||
public void testWithMembers() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/cyclicHierarchy/withCompanion/withMembers.kt");
|
||||
@TestMetadata("withIrrelevantInterface_before.kt")
|
||||
public void testWithIrrelevantInterface_before() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/cyclicHierarchy/withCompanion/withIrrelevantInterface_before.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("withMembers_after.kt")
|
||||
public void testWithMembers_after() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/cyclicHierarchy/withCompanion/withMembers_after.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("withMembers_before.kt")
|
||||
public void testWithMembers_before() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/cyclicHierarchy/withCompanion/withMembers_before.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("withoutTypeReference.kt")
|
||||
@@ -6647,9 +6687,14 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest {
|
||||
runTest("compiler/testData/diagnostics/tests/enum/constructorWithDefaultParametersOnly.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("dontCreatePackageTypeForEnumEntry.kt")
|
||||
public void testDontCreatePackageTypeForEnumEntry() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/enum/dontCreatePackageTypeForEnumEntry.kt");
|
||||
@TestMetadata("dontCreatePackageTypeForEnumEntry_after.kt")
|
||||
public void testDontCreatePackageTypeForEnumEntry_after() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/enum/dontCreatePackageTypeForEnumEntry_after.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("dontCreatePackageTypeForEnumEntry_before.kt")
|
||||
public void testDontCreatePackageTypeForEnumEntry_before() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/enum/dontCreatePackageTypeForEnumEntry_before.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("emptyConstructor.kt")
|
||||
@@ -6904,9 +6949,14 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest {
|
||||
runTest("compiler/testData/diagnostics/tests/enum/inner/insideEnum.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("insideEnumEntry.kt")
|
||||
public void testInsideEnumEntry() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/enum/inner/insideEnumEntry.kt");
|
||||
@TestMetadata("insideEnumEntry_after.kt")
|
||||
public void testInsideEnumEntry_after() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/enum/inner/insideEnumEntry_after.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("insideEnumEntry_before.kt")
|
||||
public void testInsideEnumEntry_before() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/enum/inner/insideEnumEntry_before.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("insideInnerClassNotAllowed.kt")
|
||||
@@ -8127,9 +8177,14 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/generics/innerClasses/implicitArguments"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
|
||||
}
|
||||
|
||||
@TestMetadata("fromCompanionObject.kt")
|
||||
public void testFromCompanionObject() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/generics/innerClasses/implicitArguments/fromCompanionObject.kt");
|
||||
@TestMetadata("fromCompanionObject_after.kt")
|
||||
public void testFromCompanionObject_after() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/generics/innerClasses/implicitArguments/fromCompanionObject_after.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("fromCompanionObject_before.kt")
|
||||
public void testFromCompanionObject_before() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/generics/innerClasses/implicitArguments/fromCompanionObject_before.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("fromOuterClassInObjectLiteral.kt")
|
||||
@@ -10964,9 +11019,14 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTest {
|
||||
runTest("compiler/testData/diagnostics/tests/inner/nestedClassInObject.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("nestedClassNotAllowed.kt")
|
||||
public void testNestedClassNotAllowed() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/inner/nestedClassNotAllowed.kt");
|
||||
@TestMetadata("nestedClassNotAllowed_after.kt")
|
||||
public void testNestedClassNotAllowed_after() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/inner/nestedClassNotAllowed_after.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("nestedClassNotAllowed_before.kt")
|
||||
public void testNestedClassNotAllowed_before() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/inner/nestedClassNotAllowed_before.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("nestedObject.kt")
|
||||
|
||||
Generated
+102
-42
@@ -1568,14 +1568,14 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing
|
||||
runTest("compiler/testData/diagnostics/tests/backingField/FieldOnVar.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("FieldReassignment.kt")
|
||||
public void testFieldReassignment() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/backingField/FieldReassignment.kt");
|
||||
@TestMetadata("FieldReassignment_after.kt")
|
||||
public void testFieldReassignment_after() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/backingField/FieldReassignment_after.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("FieldReassignmentError.kt")
|
||||
public void testFieldReassignmentError() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/backingField/FieldReassignmentError.kt");
|
||||
@TestMetadata("FieldReassignment_before.kt")
|
||||
public void testFieldReassignment_before() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/backingField/FieldReassignment_before.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("FieldShadow.kt")
|
||||
@@ -3044,9 +3044,14 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing
|
||||
runTest("compiler/testData/diagnostics/tests/classObjects/InnerClassAccessThroughClassObject.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("InnerClassAccessThroughEnum.kt")
|
||||
public void testInnerClassAccessThroughEnum() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/classObjects/InnerClassAccessThroughEnum.kt");
|
||||
@TestMetadata("InnerClassAccessThroughEnum_after.kt")
|
||||
public void testInnerClassAccessThroughEnum_after() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/classObjects/InnerClassAccessThroughEnum_after.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("InnerClassAccessThroughEnum_before.kt")
|
||||
public void testInnerClassAccessThroughEnum_before() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/classObjects/InnerClassAccessThroughEnum_before.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("InnerClassClassObject.kt")
|
||||
@@ -3313,9 +3318,14 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing
|
||||
runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/assignmentInLocalsInConstructor.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("backingFieldInsideGetter.kt")
|
||||
public void testBackingFieldInsideGetter() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/backingFieldInsideGetter.kt");
|
||||
@TestMetadata("backingFieldInsideGetter_after.kt")
|
||||
public void testBackingFieldInsideGetter_after() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/backingFieldInsideGetter_after.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("backingFieldInsideGetter_before.kt")
|
||||
public void testBackingFieldInsideGetter_before() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/backingFieldInsideGetter_before.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("breakContinueInTryFinally.kt")
|
||||
@@ -3408,9 +3418,14 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing
|
||||
runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/initializationInLocalFun.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("initializationInLocalViaExplicitThis.kt")
|
||||
public void testInitializationInLocalViaExplicitThis() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/initializationInLocalViaExplicitThis.kt");
|
||||
@TestMetadata("initializationInLocalViaExplicitThis_after.kt")
|
||||
public void testInitializationInLocalViaExplicitThis_after() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/initializationInLocalViaExplicitThis_after.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("initializationInLocalViaExplicitThis_before.kt")
|
||||
public void testInitializationInLocalViaExplicitThis_before() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/controlFlowAnalysis/initializationInLocalViaExplicitThis_before.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt1001.kt")
|
||||
@@ -4250,19 +4265,34 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/cyclicHierarchy/withCompanion"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
|
||||
}
|
||||
|
||||
@TestMetadata("everythingInOneScope.kt")
|
||||
public void testEverythingInOneScope() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/cyclicHierarchy/withCompanion/everythingInOneScope.kt");
|
||||
@TestMetadata("everythingInOneScope_after.kt")
|
||||
public void testEverythingInOneScope_after() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/cyclicHierarchy/withCompanion/everythingInOneScope_after.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("noMembers.kt")
|
||||
public void testNoMembers() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/cyclicHierarchy/withCompanion/noMembers.kt");
|
||||
@TestMetadata("everythingInOneScope_before.kt")
|
||||
public void testEverythingInOneScope_before() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/cyclicHierarchy/withCompanion/everythingInOneScope_before.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("onlyInterfaces.kt")
|
||||
public void testOnlyInterfaces() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/cyclicHierarchy/withCompanion/onlyInterfaces.kt");
|
||||
@TestMetadata("noMembers_after.kt")
|
||||
public void testNoMembers_after() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/cyclicHierarchy/withCompanion/noMembers_after.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("noMembers_before.kt")
|
||||
public void testNoMembers_before() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/cyclicHierarchy/withCompanion/noMembers_before.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("onlyInterfaces_after.kt")
|
||||
public void testOnlyInterfaces_after() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/cyclicHierarchy/withCompanion/onlyInterfaces_after.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("onlyInterfaces_before.kt")
|
||||
public void testOnlyInterfaces_before() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/cyclicHierarchy/withCompanion/onlyInterfaces_before.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("typeIsLowEnough.kt")
|
||||
@@ -4270,14 +4300,24 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing
|
||||
runTest("compiler/testData/diagnostics/tests/cyclicHierarchy/withCompanion/typeIsLowEnough.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("withIrrelevantInterface.kt")
|
||||
public void testWithIrrelevantInterface() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/cyclicHierarchy/withCompanion/withIrrelevantInterface.kt");
|
||||
@TestMetadata("withIrrelevantInterface_after.kt")
|
||||
public void testWithIrrelevantInterface_after() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/cyclicHierarchy/withCompanion/withIrrelevantInterface_after.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("withMembers.kt")
|
||||
public void testWithMembers() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/cyclicHierarchy/withCompanion/withMembers.kt");
|
||||
@TestMetadata("withIrrelevantInterface_before.kt")
|
||||
public void testWithIrrelevantInterface_before() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/cyclicHierarchy/withCompanion/withIrrelevantInterface_before.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("withMembers_after.kt")
|
||||
public void testWithMembers_after() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/cyclicHierarchy/withCompanion/withMembers_after.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("withMembers_before.kt")
|
||||
public void testWithMembers_before() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/cyclicHierarchy/withCompanion/withMembers_before.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("withoutTypeReference.kt")
|
||||
@@ -6647,9 +6687,14 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing
|
||||
runTest("compiler/testData/diagnostics/tests/enum/constructorWithDefaultParametersOnly.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("dontCreatePackageTypeForEnumEntry.kt")
|
||||
public void testDontCreatePackageTypeForEnumEntry() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/enum/dontCreatePackageTypeForEnumEntry.kt");
|
||||
@TestMetadata("dontCreatePackageTypeForEnumEntry_after.kt")
|
||||
public void testDontCreatePackageTypeForEnumEntry_after() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/enum/dontCreatePackageTypeForEnumEntry_after.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("dontCreatePackageTypeForEnumEntry_before.kt")
|
||||
public void testDontCreatePackageTypeForEnumEntry_before() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/enum/dontCreatePackageTypeForEnumEntry_before.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("emptyConstructor.kt")
|
||||
@@ -6904,9 +6949,14 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing
|
||||
runTest("compiler/testData/diagnostics/tests/enum/inner/insideEnum.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("insideEnumEntry.kt")
|
||||
public void testInsideEnumEntry() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/enum/inner/insideEnumEntry.kt");
|
||||
@TestMetadata("insideEnumEntry_after.kt")
|
||||
public void testInsideEnumEntry_after() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/enum/inner/insideEnumEntry_after.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("insideEnumEntry_before.kt")
|
||||
public void testInsideEnumEntry_before() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/enum/inner/insideEnumEntry_before.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("insideInnerClassNotAllowed.kt")
|
||||
@@ -8127,9 +8177,14 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/diagnostics/tests/generics/innerClasses/implicitArguments"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
|
||||
}
|
||||
|
||||
@TestMetadata("fromCompanionObject.kt")
|
||||
public void testFromCompanionObject() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/generics/innerClasses/implicitArguments/fromCompanionObject.kt");
|
||||
@TestMetadata("fromCompanionObject_after.kt")
|
||||
public void testFromCompanionObject_after() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/generics/innerClasses/implicitArguments/fromCompanionObject_after.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("fromCompanionObject_before.kt")
|
||||
public void testFromCompanionObject_before() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/generics/innerClasses/implicitArguments/fromCompanionObject_before.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("fromOuterClassInObjectLiteral.kt")
|
||||
@@ -10964,9 +11019,14 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing
|
||||
runTest("compiler/testData/diagnostics/tests/inner/nestedClassInObject.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("nestedClassNotAllowed.kt")
|
||||
public void testNestedClassNotAllowed() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/inner/nestedClassNotAllowed.kt");
|
||||
@TestMetadata("nestedClassNotAllowed_after.kt")
|
||||
public void testNestedClassNotAllowed_after() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/inner/nestedClassNotAllowed_after.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("nestedClassNotAllowed_before.kt")
|
||||
public void testNestedClassNotAllowed_before() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/inner/nestedClassNotAllowed_before.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("nestedObject.kt")
|
||||
|
||||
Reference in New Issue
Block a user