FIR: disable synthetic scope, make accessor symbols synthetic
Before this commit, we had two methods to do generally the same synthetic thing. It's an attempt to keep only one of them. Accessor symbols are generated in Java use-site member scopes, at this place we know better whether we are in Java class or not. However, we have to do this at every use-site level, which is relatively slow. Also we could encounter problems when accessor function is overridden in Kotlin, and accessor symbol can still contain reference to Java accessor.
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
/*
|
||||
* Copyright 2010-2019 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.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlin.fir.symbols
|
||||
|
||||
interface SyntheticSymbol
|
||||
@@ -7,6 +7,7 @@ package org.jetbrains.kotlin.fir.symbols.impl
|
||||
|
||||
import org.jetbrains.kotlin.fir.declarations.*
|
||||
import org.jetbrains.kotlin.fir.symbols.CallableId
|
||||
import org.jetbrains.kotlin.fir.symbols.SyntheticSymbol
|
||||
import org.jetbrains.kotlin.fir.types.ConeKotlinType
|
||||
import org.jetbrains.kotlin.name.FqName
|
||||
import org.jetbrains.kotlin.name.Name
|
||||
@@ -35,7 +36,7 @@ class FirConstructorSymbol(
|
||||
class FirAccessorSymbol(
|
||||
callableId: CallableId,
|
||||
val accessorId: CallableId
|
||||
) : FirFunctionSymbol<FirSimpleFunction>(callableId)
|
||||
) : FirFunctionSymbol<FirSimpleFunction>(callableId), SyntheticSymbol
|
||||
|
||||
// ------------------------ unnamed ------------------------
|
||||
|
||||
|
||||
Reference in New Issue
Block a user