Skip to content

Commit 0579604

Browse files
committed
Do not propose to specify constructor invocation in diagnostics
#KT-17188 Fixed
1 parent 0f350f5 commit 0579604

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

compiler/frontend/src/org/jetbrains/kotlin/diagnostics/rendering/DefaultErrorMessages.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ public static DiagnosticRenderer getRendererForDiagnostic(@NotNull Diagnostic di
402402
MAP.put(WRONG_SETTER_PARAMETER_TYPE, "Setter parameter type must be equal to the type of the property, i.e. ''{0}''", RENDER_TYPE, RENDER_TYPE);
403403
MAP.put(WRONG_GETTER_RETURN_TYPE, "Getter return type must be equal to the type of the property, i.e. ''{0}''", RENDER_TYPE, RENDER_TYPE);
404404
MAP.put(WRONG_SETTER_RETURN_TYPE, "Setter return type must be Unit");
405-
MAP.put(NO_COMPANION_OBJECT, "Please specify constructor invocation; classifier ''{0}'' does not have a companion object", NAME);
405+
MAP.put(NO_COMPANION_OBJECT, "Classifier ''{0}'' does not have a companion object, and thus must be initialized here", NAME);
406406
MAP.put(TYPE_PARAMETER_IS_NOT_AN_EXPRESSION, "Type parameter ''{0}'' is not an expression", NAME);
407407
MAP.put(TYPE_PARAMETER_ON_LHS_OF_DOT, "Type parameter ''{0}'' cannot have or inherit a companion object, so it cannot be on the left hand side of dot", NAME);
408408
MAP.put(NESTED_CLASS_ACCESSED_VIA_INSTANCE_REFERENCE, "Nested {0} accessed via instance reference", RENDER_CLASS_OR_OBJECT_NAME);

idea/testData/quickfix/autoImports/unresolvedReferenceInCall.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// "Import" "true"
2-
// ERROR: Please specify constructor invocation; classifier 'ArrayList' does not have a companion object
2+
// ERROR: Classifier 'ArrayList' does not have a companion object, and thus must be initialized here
33

44
// KT-4000
55

idea/testData/quickfix/autoImports/unresolvedReferenceInCall.kt.after

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// "Import" "true"
2-
// ERROR: Please specify constructor invocation; classifier 'ArrayList' does not have a companion object
2+
// ERROR: Classifier 'ArrayList' does not have a companion object, and thus must be initialized here
33

44
// KT-4000
55

jps-plugin/testData/incremental/pureKotlin/removeAndRestoreCompanionWithImplicitUsages/build.log

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Exit code: ABORT
3232
------------------------------------------
3333
COMPILATION FAILED
3434
Unresolved reference: Companion
35-
Please specify constructor invocation; classifier 'A' does not have a companion object
35+
Classifier 'A' does not have a companion object, and thus must be initialized here
3636

3737
================ Step #2 =================
3838

jps-plugin/testData/incremental/pureKotlin/removeAndRestoreCompanionWithImplicitUsages/experimental-ic-build.log

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Exit code: ABORT
3737
------------------------------------------
3838
COMPILATION FAILED
3939
Unresolved reference: Companion
40-
Please specify constructor invocation; classifier 'A' does not have a companion object
40+
Classifier 'A' does not have a companion object, and thus must be initialized here
4141

4242
================ Step #2 =================
4343

0 commit comments

Comments
 (0)