Rename: NO_RECEIVER_ADMITTED -> NO_RECEIVER_ALLOWED

This commit is contained in:
Svetlana Isakova
2014-10-03 14:32:38 +04:00
parent cd3dc5998f
commit c0eb894bd9
5 changed files with 5 additions and 5 deletions
@@ -357,7 +357,7 @@ public interface Errors {
DiagnosticFactory1<JetElement, ValueParameterDescriptor> NO_VALUE_FOR_PARAMETER = DiagnosticFactory1.create(ERROR, VALUE_ARGUMENTS);
DiagnosticFactory1<JetExpression, JetType> MISSING_RECEIVER = DiagnosticFactory1.create(ERROR);
DiagnosticFactory0<JetExpression> NO_RECEIVER_ADMITTED = DiagnosticFactory0.create(ERROR);
DiagnosticFactory0<JetExpression> NO_RECEIVER_ALLOWED = DiagnosticFactory0.create(ERROR);
// Call resolution
@@ -459,7 +459,7 @@ public class DefaultErrorMessages {
MAP.put(NO_VALUE_FOR_PARAMETER, "No value passed for parameter {0}", NAME);
MAP.put(MISSING_RECEIVER, "A receiver of type {0} is required", RENDER_TYPE);
MAP.put(NO_RECEIVER_ADMITTED, "No receiver can be passed to this function or property");
MAP.put(NO_RECEIVER_ALLOWED, "No receiver can be passed to this function or property");
MAP.put(CREATING_AN_INSTANCE_OF_ABSTRACT_CLASS, "Cannot create an instance of an abstract class");
@@ -93,7 +93,7 @@ public abstract class AbstractTracingStrategy implements TracingStrategy {
@Override
public void noReceiverAllowed(@NotNull BindingTrace trace) {
trace.report(NO_RECEIVER_ADMITTED.on(reference));
trace.report(NO_RECEIVER_ALLOWED.on(reference));
}
@Override
@@ -78,5 +78,5 @@ fun test() {
i<!UNSAFE_CALL!>.<!>{Int.() -> 1}();
{}<!WRONG_NUMBER_OF_TYPE_ARGUMENTS!><Int><!>()
1<!UNNECESSARY_SAFE_CALL!>?.<!>{Int.() -> 1}()
1.<!NO_RECEIVER_ADMITTED!>{}<!>()
1.<!NO_RECEIVER_ALLOWED!>{}<!>()
}
@@ -7,5 +7,5 @@ fun test1(f: String.() -> Unit) {
fun test2(f: (Int) -> Int) {
1.<!UNRESOLVED_REFERENCE!>f<!>(2)
2.<!NO_RECEIVER_ADMITTED!>(f)<!>(2)
2.<!NO_RECEIVER_ALLOWED!>(f)<!>(2)
}