Implement correct is check for SuspendFunction

Let callable references implement SuspendFunction
Do not generate CHECKCAST SuspendFunction when LV is 1.2

 #KT-25825: Fixed
This commit is contained in:
Ilmir Usmanov
2018-08-10 20:22:06 +03:00
parent 9eb612a605
commit 4a7703ed66
13 changed files with 202 additions and 40 deletions
@@ -1,17 +1,6 @@
/*
* Copyright 2010-2015 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* Copyright 2010-2018 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.resolve.jvm;
@@ -74,6 +63,8 @@ public class AsmTypes {
public static final Type K_MUTABLE_PROPERTY1_TYPE = reflect("KMutableProperty1");
public static final Type K_MUTABLE_PROPERTY2_TYPE = reflect("KMutableProperty2");
public static final Type SUSPEND_FUNCTION_TYPE = Type.getObjectType("kotlin/coroutines/jvm/internal/SuspendFunction");
public static final String REFLECTION = "kotlin/jvm/internal/Reflection";
public static final String REF_TYPE_PREFIX = "kotlin/jvm/internal/Ref$";