diff --git a/idea/src/org/jetbrains/jet/plugin/quickfix/ChangeFunctionReturnTypeFix.java b/idea/src/org/jetbrains/jet/plugin/quickfix/ChangeFunctionReturnTypeFix.java index ea34a1dbe19..246d3c322e5 100644 --- a/idea/src/org/jetbrains/jet/plugin/quickfix/ChangeFunctionReturnTypeFix.java +++ b/idea/src/org/jetbrains/jet/plugin/quickfix/ChangeFunctionReturnTypeFix.java @@ -185,4 +185,24 @@ public class ChangeFunctionReturnTypeFix extends JetIntentionAction"" \ No newline at end of file diff --git a/idea/testData/quickfix/typeMismatch/afterTypeMismatchInReturnStatement.kt b/idea/testData/quickfix/typeMismatch/afterTypeMismatchInReturnStatement.kt new file mode 100644 index 00000000000..eb37598a97b --- /dev/null +++ b/idea/testData/quickfix/typeMismatch/afterTypeMismatchInReturnStatement.kt @@ -0,0 +1,4 @@ +// "Change 'foo' function return type to 'String'" "true" +fun foo(): String { + return "" +} \ No newline at end of file diff --git a/idea/testData/quickfix/typeMismatch/beforeTypeMismatchInInitializer.kt b/idea/testData/quickfix/typeMismatch/beforeTypeMismatchInInitializer.kt new file mode 100644 index 00000000000..7fc2c617bd9 --- /dev/null +++ b/idea/testData/quickfix/typeMismatch/beforeTypeMismatchInInitializer.kt @@ -0,0 +1,2 @@ +// "Change 'foo' function return type to 'String'" "true" +fun foo(): Int = "" \ No newline at end of file diff --git a/idea/testData/quickfix/typeMismatch/beforeTypeMismatchInReturnStatement.kt b/idea/testData/quickfix/typeMismatch/beforeTypeMismatchInReturnStatement.kt new file mode 100644 index 00000000000..71a0a7aa945 --- /dev/null +++ b/idea/testData/quickfix/typeMismatch/beforeTypeMismatchInReturnStatement.kt @@ -0,0 +1,4 @@ +// "Change 'foo' function return type to 'String'" "true" +fun foo() { + return "" +} \ No newline at end of file diff --git a/idea/tests/org/jetbrains/jet/plugin/quickfix/QuickFixTestGenerated.java b/idea/tests/org/jetbrains/jet/plugin/quickfix/QuickFixTestGenerated.java index 05a974141e4..e26c3ac86b9 100644 --- a/idea/tests/org/jetbrains/jet/plugin/quickfix/QuickFixTestGenerated.java +++ b/idea/tests/org/jetbrains/jet/plugin/quickfix/QuickFixTestGenerated.java @@ -1063,6 +1063,16 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest { doTest("idea/testData/quickfix/typeMismatch/beforeReturnTypeMismatch.kt"); } + @TestMetadata("beforeTypeMismatchInInitializer.kt") + public void testTypeMismatchInInitializer() throws Exception { + doTest("idea/testData/quickfix/typeMismatch/beforeTypeMismatchInInitializer.kt"); + } + + @TestMetadata("beforeTypeMismatchInReturnStatement.kt") + public void testTypeMismatchInReturnStatement() throws Exception { + doTest("idea/testData/quickfix/typeMismatch/beforeTypeMismatchInReturnStatement.kt"); + } + } @TestMetadata("idea/testData/quickfix/typeProjection")