Improve diagnostic message for annotations with @receiver

#KT-14647 Fixed
This commit is contained in:
Mikhail Zarechenskiy
2017-06-29 21:12:26 +03:00
parent f5cd8c7e4d
commit c853ac95ad
3 changed files with 3 additions and 3 deletions
@@ -156,7 +156,7 @@ public class DefaultErrorMessages {
MAP.put(INAPPLICABLE_TARGET_PROPERTY_IMMUTABLE, "''@{0}:'' annotations could be applied only to mutable properties", TO_STRING);
MAP.put(INAPPLICABLE_TARGET_PROPERTY_HAS_NO_DELEGATE, "'@delegate:' annotations could be applied only to delegated properties");
MAP.put(INAPPLICABLE_TARGET_PROPERTY_HAS_NO_BACKING_FIELD, "'@field:' annotations could be applied only to properties with backing fields");
MAP.put(INAPPLICABLE_RECEIVER_TARGET, "'@receiver:' annotations could be applied only to extension function or extension property declarations");
MAP.put(INAPPLICABLE_RECEIVER_TARGET, "'@receiver:' annotations can only be applied to the receiver type of extension function or extension property declarations");
MAP.put(INAPPLICABLE_PARAM_TARGET, "'@param:' annotations could be applied only to primary constructor parameters");
MAP.put(REDUNDANT_ANNOTATION_TARGET, "Redundant annotation target ''{0}''", STRING);
@@ -1,5 +1,5 @@
// "Move annotation to receiver type" "false"
// ERROR: '@receiver:' annotations could be applied only to extension function or extension property declarations
// ERROR: '@receiver:' annotations can only be applied to the receiver type of extension function or extension property declarations
// ACTION: Convert to expression body
// ACTION: Make internal
// ACTION: Make private
@@ -1,5 +1,5 @@
// "Move annotation to receiver type" "false"
// ERROR: '@receiver:' annotations could be applied only to extension function or extension property declarations
// ERROR: '@receiver:' annotations can only be applied to the receiver type of extension function or extension property declarations
// ACTION: Make internal
// ACTION: Make private
// ACTION: Specify type explicitly