[Analysis API] Add test for inlined local class collection

This commit is contained in:
Yan Zhulanow
2023-07-26 22:36:44 +09:00
committed by Space Team
parent 7821ef0414
commit c44925dbed
3 changed files with 47 additions and 0 deletions
@@ -0,0 +1,36 @@
/*
* Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
// FILE: base.kt
package base
inline fun base() {
class Base {}
Base()
}
inline fun another() {
class Another {}
Another()
}
// FILE: lib.kt
package lib
import base.*
inline fun lib() {
class Lib {}
base()
}
// FILE: main.kt
package test
import lib.*
fun foo() {
lib()
}
@@ -0,0 +1,5 @@
File base.kt
File lib.kt
File main.kt
Class Lib
Class Base
@@ -36,6 +36,12 @@ public class CompilationPeerAnalysisTestGenerated extends AbstractCompilationPee
runTest("analysis/low-level-api-fir/testdata/compilationPeers/functionCallDeep.kt");
}
@Test
@TestMetadata("inlinedClasses.kt")
public void testInlinedClasses() throws Exception {
runTest("analysis/low-level-api-fir/testdata/compilationPeers/inlinedClasses.kt");
}
@Test
@TestMetadata("libraryFunctionCall.kt")
public void testLibraryFunctionCall() throws Exception {