Skip to content

Commit 9f52f80

Browse files
sandwwraithSpace Team
authored andcommitted
[FIR] Fix test data for #KT-80708
1 parent 3d84e15 commit 9f52f80

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
// LL_FIR_DIVERGENCE
2+
// KT-80708 firProvider.getFirCallableContainerFile difference for LL and Fir on local classes
3+
// LL_FIR_DIVERGENCE
4+
// RUN_PIPELINE_TILL: BACKEND
5+
// WITH_STDLIB
6+
7+
@file:MustUseReturnValue
8+
9+
fun localFun() {
10+
fun local(): Int = 123
11+
@IgnorableReturnValue fun localIgnorable() = ""
12+
local()
13+
localIgnorable()
14+
}
15+
16+
class Outer {
17+
fun foo(): String {
18+
class Inner {
19+
@IgnorableReturnValue fun bar() {
20+
fun local() = ""
21+
local()
22+
}
23+
fun inner() = ""
24+
}
25+
<!RETURN_VALUE_NOT_USED!>Inner()<!>
26+
<!RETURN_VALUE_NOT_USED!>Inner().inner()<!>
27+
Inner().bar()
28+
return ""
29+
}
30+
31+
fun bar(): String = ""
32+
}
33+
34+
fun main() {
35+
<!RETURN_VALUE_NOT_USED!>Outer().foo()<!>
36+
<!RETURN_VALUE_NOT_USED!>Outer().bar()<!>
37+
}
38+
39+
/* GENERATED_FIR_TAGS: annotationUseSiteTargetFile, classDeclaration, functionDeclaration, integerLiteral, localFunction */

0 commit comments

Comments
 (0)