Do not report DSL scope violation error when language-version is 1.0

#KT-11551 Fixed
This commit is contained in:
Denis Zharkov
2016-10-25 17:19:49 +03:00
parent 7553d3f72b
commit 6491d3fbac
5 changed files with 66 additions and 1 deletions
@@ -17,6 +17,7 @@
package org.jetbrains.kotlin.resolve.calls.checkers
import com.intellij.psi.PsiElement
import org.jetbrains.kotlin.config.LanguageFeature
import org.jetbrains.kotlin.descriptors.ClassDescriptor
import org.jetbrains.kotlin.descriptors.annotations.AnnotationDescriptor
import org.jetbrains.kotlin.descriptors.annotations.Annotations
@@ -32,6 +33,7 @@ import org.jetbrains.kotlin.resolve.scopes.utils.parentsWithSelf
object DslScopeViolationCallChecker : CallChecker {
override fun check(resolvedCall: ResolvedCall<*>, reportOn: PsiElement, context: CallCheckerContext) {
if (!context.languageVersionSettings.supportsFeature(LanguageFeature.DslMarkersSupport)) return
val callImplicitReceivers = resolvedCall.getImplicitReceivers()
for (callImplicitReceiver in callImplicitReceivers) {