Fix delegated property resolve on number literals and proper types

There is no need to update type of delegate expression if it's already
 resolved correctly (doesn't include non-proper types). In almost all
 cases it was fine except number literals as there we didn't box
 expression in backend and got problems at bytecode verification stage

 #KT-40057 Fixed
This commit is contained in:
Mikhail Zarechenskiy
2020-07-14 12:58:27 +03:00
parent e5bca3ce29
commit fcf7a55ccc
9 changed files with 71 additions and 2 deletions
@@ -10836,6 +10836,11 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
runTest("compiler/testData/codegen/box/delegatedProperty/provideDelegate/genericDelegateWithNoAdditionalInfo.kt");
}
@TestMetadata("genericProvideDelegateOnNumberLiteral.kt")
public void testGenericProvideDelegateOnNumberLiteral() throws Exception {
runTest("compiler/testData/codegen/box/delegatedProperty/provideDelegate/genericProvideDelegateOnNumberLiteral.kt");
}
@TestMetadata("hostCheck.kt")
public void testHostCheck() throws Exception {
runTest("compiler/testData/codegen/box/delegatedProperty/provideDelegate/hostCheck.kt");