FIR: introduce callable member symbols & initial member scopes
Initial member scopes cover top-level, class-level, and supers Ad-hock version of call resolve was introduced to test them NB: after this commit, total Kotlin resolve test cannot finish because of scope problems in type resolve transformer Related to KT-24078 #KT-24083 Fixed
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
/*
|
||||
* Copyright 2010-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
|
||||
* that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlin.fir.symbols
|
||||
|
||||
import org.jetbrains.kotlin.fir.types.ConeKotlinType
|
||||
import org.jetbrains.kotlin.name.FqName
|
||||
import org.jetbrains.kotlin.name.Name
|
||||
|
||||
// NB: with className == null we are at top level
|
||||
data class CallableId(val packageName: FqName, val className: FqName?, val callableName: Name) {
|
||||
constructor(packageName: FqName, callableName: Name): this(packageName, null, callableName)
|
||||
|
||||
override fun toString(): String {
|
||||
return buildString {
|
||||
append(packageName.asString().replace('.', '/'))
|
||||
append("/")
|
||||
if (className != null) {
|
||||
append(className)
|
||||
append(".")
|
||||
}
|
||||
append(callableName)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
interface ConeCallableSymbol : ConeSymbol {
|
||||
val callableId: CallableId
|
||||
}
|
||||
|
||||
interface ConePropertySymbol : ConeCallableSymbol
|
||||
|
||||
interface ConeFunctionSymbol : ConeCallableSymbol {
|
||||
val parameters: List<ConeKotlinType>
|
||||
}
|
||||
Reference in New Issue
Block a user