diff --git a/inform7/Tests/Test Problems/PM_ObjectIsAction2.txt b/inform7/Tests/Test Problems/PM_ObjectIsAction2.txt new file mode 100644 index 0000000000..50bd94fb35 --- /dev/null +++ b/inform7/Tests/Test Problems/PM_ObjectIsAction2.txt @@ -0,0 +1,2 @@ +Foo is a room. +Zog is initially examining yourself. diff --git a/inform7/Tests/Test Problems/_Results_Ideal/PM_ObjectIsAction2.txt b/inform7/Tests/Test Problems/_Results_Ideal/PM_ObjectIsAction2.txt new file mode 100644 index 0000000000..2f4eb40d99 --- /dev/null +++ b/inform7/Tests/Test Problems/_Results_Ideal/PM_ObjectIsAction2.txt @@ -0,0 +1,11 @@ +Inform 7 v10.1.0 has started. +I've now read your source text, which is 9 words long. +I've also read Basic Inform by Graham Nelson, which is 7691 words long. +I've also read English Language by Graham Nelson, which is 2328 words long. +I've also read Standard Rules by Graham Nelson, which is 32132 words long. +Problem__ PM_ObjectIsAction2 + >--> You wrote 'Zog is initially examining yourself' (source text, line 2): + but you need to add 'the action of' after 'initially', in order to clarify + that you mean this sentence to set a variable to an action (if in fact + that's what you mean to do!). +Inform 7 has finished. diff --git a/inform7/assertions-module/Chapter 4/Assertions.w b/inform7/assertions-module/Chapter 4/Assertions.w index 3108ddbf9c..bbfc20ae85 100644 --- a/inform7/assertions-module/Chapter 4/Assertions.w +++ b/inform7/assertions-module/Chapter 4/Assertions.w @@ -1093,12 +1093,20 @@ opera about a dog, "Collared Is Bowser".) "and it would only confuse things if we used it for a value as well."); Problems::issue_problem_end(); } else { - Problems::Using::assertion_problem(Task::syntax_tree(), _p_(PM_ObjectIsAction), - "that is putting the definition back to front", - "since I need these categorisations of actions to take the form 'Kissing a " - "woman is love', not 'Love is kissing a woman'. (This is really because it " - "is better style: love might be many other things too, and we don't want to " - "imply that the present definition is all-inclusive.)"); + parse_node *v = current_sentence->down; + if ((Node::is(v, VERB_NT)) && + (Annotations::read_int(v, verbal_certainty_ANNOT) == INITIALLY_CE)) + Problems::Using::assertion_problem(Task::syntax_tree(), _p_(PM_ObjectIsAction2), + "you need to add 'the action of' after 'initially'", + "in order to clarify that you mean this sentence to set a variable " + "to an action (if in fact that's what you mean to do!)."); + else + Problems::Using::assertion_problem(Task::syntax_tree(), _p_(PM_ObjectIsAction), + "that is putting the definition back to front", + "since I need these categorisations of actions to take the form 'Kissing a " + "woman is love', not 'Love is kissing a woman'. (This is really because it " + "is better style: love might be many other things too, and we don't want to " + "imply that the present definition is all-inclusive.)"); } @h Case 33. "Every K is every L."