diff --git a/collects/profj/check.ss b/collects/profj/check.ss index 451db8e7ee..40bfabc88e 100644 --- a/collects/profj/check.ss +++ b/collects/profj/check.ss @@ -3148,8 +3148,8 @@ (case kind ((method) (string-append - (format "This method call uses an unfound method ~a, which is similar to a reserved word~n" - n) + (format "No method ~a for this call can be found. ~a resembles a reserved word.~n" + n n) "Perhaps it is miscapitalized or misspelled")) ((field) (string-append @@ -3171,7 +3171,7 @@ (define (beginner-method-access-error name src) (let ((n (id->ext-name name))) (raise-error n - (format "Method ~a from the current class must be called on 'this'" n) + (format "A call to method ~a requires a target object, such as 'this'." n) n src))) diff --git a/collects/profj/parsers/advanced-parser.ss b/collects/profj/parsers/advanced-parser.ss index eb31ab41d8..4b41d041f2 100644 --- a/collects/profj/parsers/advanced-parser.ss +++ b/collects/profj/parsers/advanced-parser.ss @@ -537,6 +537,7 @@ (StatementExpressionList [(StatementExpression) (list $1)] + [(Assignment) (list $1)] [(StatementExpressionList COMMA StatementExpression) (cons $3 $1)]) (BreakStatement