From 191dfa1f2be9a2f7a2670ed54292bf12a630060f Mon Sep 17 00:00:00 2001 From: Alexander Udalov Date: Tue, 5 Jul 2016 19:54:16 +0300 Subject: [PATCH] Minor, add test that language feature settings are used in local analysis This test checks that the correct LanguageFeatureSettings instance (not LanguageVersion.LATEST) is being passed to createContainerForLazyLocalClassifierAnalyzer --- .../sourceCompatibility/noLocalDelegatedProperty.kt | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/compiler/testData/diagnostics/tests/sourceCompatibility/noLocalDelegatedProperty.kt b/compiler/testData/diagnostics/tests/sourceCompatibility/noLocalDelegatedProperty.kt index 22da64b9d2b..b43bded65ab 100644 --- a/compiler/testData/diagnostics/tests/sourceCompatibility/noLocalDelegatedProperty.kt +++ b/compiler/testData/diagnostics/tests/sourceCompatibility/noLocalDelegatedProperty.kt @@ -10,5 +10,12 @@ fun foo(): Int { val prop2: Int by 123 - return prop + prop2 + val obj = object { + fun v(): Int { + val prop3: Int by Delegate() + return prop3 + } + } + + return prop + prop2 + obj.v() }