mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-10 08:31:29 +00:00
Support selective filtering of implicits for extensions resolution in REPL
This commit is contained in:
committed by
Ilya Chernikov
parent
017f640f26
commit
94de114894
@@ -0,0 +1,23 @@
|
||||
/*
|
||||
* Copyright 2010-2020 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.scripting.resolve
|
||||
|
||||
import kotlin.script.experimental.api.KotlinType
|
||||
import kotlin.script.experimental.api.ScriptCompilationConfigurationKeys
|
||||
import kotlin.script.experimental.util.PropertiesCollection
|
||||
|
||||
/**
|
||||
* Classes for which instances extensions should not be resolved if they are used in implicit context
|
||||
*/
|
||||
val ScriptCompilationConfigurationKeys.skipExtensionsResolutionForImplicits
|
||||
by PropertiesCollection.key<Collection<KotlinType>>(emptyList())
|
||||
|
||||
/**
|
||||
* Extensions resolution for these classes in implicit context of their instances will be done only for innermost instance
|
||||
* in scopes chain. Instances of each class in collection are handled separately.
|
||||
*/
|
||||
val ScriptCompilationConfigurationKeys.skipExtensionsResolutionForImplicitsExceptInnermost
|
||||
by PropertiesCollection.key<Collection<KotlinType>>(emptyList())
|
||||
Reference in New Issue
Block a user