FIR: add replaceSource to all FIR tree nodes

This commit is contained in:
Mikhail Glukhikh
2021-02-17 14:14:30 +03:00
parent b8d1bbdd0d
commit 742f1e0069
249 changed files with 807 additions and 95 deletions
@@ -377,6 +377,9 @@ class FirFakeArgumentForCallableReference(
override fun <D> transformChildren(transformer: FirTransformer<D>, data: D): FirElement {
error("should not be called")
}
override fun replaceSource(newSource: FirSourceElement?) {
}
}
fun ConeKotlinType.isKCallableType(): Boolean {
@@ -23,6 +23,9 @@ class FirControlFlowGraphReferenceImpl(
override fun <D> transformChildren(transformer: FirTransformer<D>, data: D): FirControlFlowGraphReference {
return this
}
override fun replaceSource(newSource: FirSourceElement?) {
}
}
class DataFlowInfo(val variableStorage: VariableStorage, val flowOnNodes: Map<CFGNode<*>, Flow>)
@@ -732,4 +732,7 @@ object FirStub : FirElement {
override fun <D> transformChildren(transformer: FirTransformer<D>, data: D): FirElement {
return this
}
override fun replaceSource(newSource: FirSourceElement?) {
}
}