FIR: fix source of callee reference in delegated constructor call

Previously the callee reference of a delegated constructor call is
always the same as the call itself. This violates the contract that no
two FIR elements can have identical sources.  In addition, this sets the
entire call expression as the source of the callee expression.

This change instead sets the proper constructor ref as the callee.

Also fixed EXPLICIT_DELEGATION_CALL_REQUIRED type. It should be an error
instead of a warning.
This commit is contained in:
Tianyu Geng
2021-03-25 16:27:03 -07:00
committed by Dmitriy Novozhilov
parent fb14b03824
commit ae902e6fe5
16 changed files with 59 additions and 22 deletions
+1 -1
View File
@@ -26,4 +26,4 @@ package toplevelObjectDeclarations
override fun foo() : Int = 1
}
val z = y.foo()
val z = y.foo()