From fd78340897c15fdeb4ed294461de37063c8a6e87 Mon Sep 17 00:00:00 2001 From: "Pavel V. Talanov" Date: Wed, 25 Jul 2012 13:59:09 +0400 Subject: [PATCH] KT-310: Tell the user when something is a property and not a function. #KT-310 Fixed --- compiler/testData/diagnostics/tests/kt310.kt | 3 +++ .../jetbrains/jet/checkers/JetDiagnosticsTestGenerated.java | 5 +++++ 2 files changed, 8 insertions(+) create mode 100644 compiler/testData/diagnostics/tests/kt310.kt diff --git a/compiler/testData/diagnostics/tests/kt310.kt b/compiler/testData/diagnostics/tests/kt310.kt new file mode 100644 index 00000000000..fed6efafaad --- /dev/null +++ b/compiler/testData/diagnostics/tests/kt310.kt @@ -0,0 +1,3 @@ +fun f(c: Array): Int { + return c.size() +} diff --git a/compiler/tests/org/jetbrains/jet/checkers/JetDiagnosticsTestGenerated.java b/compiler/tests/org/jetbrains/jet/checkers/JetDiagnosticsTestGenerated.java index a0279cbe40d..2afddc92f0e 100644 --- a/compiler/tests/org/jetbrains/jet/checkers/JetDiagnosticsTestGenerated.java +++ b/compiler/tests/org/jetbrains/jet/checkers/JetDiagnosticsTestGenerated.java @@ -265,6 +265,11 @@ public class JetDiagnosticsTestGenerated extends AbstractDiagnosticsTestWithEage doTest("compiler/testData/diagnostics/tests/IsExpressions.kt"); } + @TestMetadata("kt310.kt") + public void testKt310() throws Exception { + doTest("compiler/testData/diagnostics/tests/kt310.kt"); + } + @TestMetadata("LValueAssignment.kt") public void testLValueAssignment() throws Exception { doTest("compiler/testData/diagnostics/tests/LValueAssignment.kt");