[Analysis API] Add test for inlined local class collection
This commit is contained in:
@@ -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
|
||||
+6
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user