From cec01237d05ce95aabc075245074d7a950db0325 Mon Sep 17 00:00:00 2001 From: Svetlana Isakova Date: Fri, 4 Jul 2014 20:51:04 +0400 Subject: [PATCH] Added test for labeled delegated expression --- .../inference/labeledDelegatedExpression.kt | 9 +++++++++ .../jet/checkers/JetDiagnosticsTestGenerated.java | 5 +++++ 2 files changed, 14 insertions(+) create mode 100644 compiler/testData/diagnostics/tests/delegatedProperty/inference/labeledDelegatedExpression.kt diff --git a/compiler/testData/diagnostics/tests/delegatedProperty/inference/labeledDelegatedExpression.kt b/compiler/testData/diagnostics/tests/delegatedProperty/inference/labeledDelegatedExpression.kt new file mode 100644 index 00000000000..ee08686c9eb --- /dev/null +++ b/compiler/testData/diagnostics/tests/delegatedProperty/inference/labeledDelegatedExpression.kt @@ -0,0 +1,9 @@ +class A3 { + val a: String by @l MyProperty() + + class MyProperty {} + + fun MyProperty.get(thisRef: Any?, desc: PropertyMetadata): T { + throw Exception("$thisRef $desc") + } +} \ No newline at end of file diff --git a/compiler/tests/org/jetbrains/jet/checkers/JetDiagnosticsTestGenerated.java b/compiler/tests/org/jetbrains/jet/checkers/JetDiagnosticsTestGenerated.java index 02e653c4fc6..8a48f351c06 100644 --- a/compiler/tests/org/jetbrains/jet/checkers/JetDiagnosticsTestGenerated.java +++ b/compiler/tests/org/jetbrains/jet/checkers/JetDiagnosticsTestGenerated.java @@ -2596,6 +2596,11 @@ public class JetDiagnosticsTestGenerated extends AbstractJetDiagnosticsTest { doTest("compiler/testData/diagnostics/tests/delegatedProperty/inference/extensionProperty.kt"); } + @TestMetadata("labeledDelegatedExpression.kt") + public void testLabeledDelegatedExpression() throws Exception { + doTest("compiler/testData/diagnostics/tests/delegatedProperty/inference/labeledDelegatedExpression.kt"); + } + @TestMetadata("noErrorsForImplicitConstraints.kt") public void testNoErrorsForImplicitConstraints() throws Exception { doTest("compiler/testData/diagnostics/tests/delegatedProperty/inference/noErrorsForImplicitConstraints.kt");