1
0
Fork 0
mirror of https://github.com/ganelson/inform.git synced 2024-07-05 08:34:22 +03:00

Fix and test case for Mantis bug 2084

This commit is contained in:
Graham Nelson 2022-04-07 10:56:26 +01:00
parent 45b53fca22
commit 6a6aa005ce

View file

@ -586,15 +586,24 @@ void Understand::property_block(property *pr, int level, inference_subject *subj
(Str::len(RTKindConstructors::get_recognition_only_GPR(ValueProperties::kind(pr))) == 0) && (Str::len(RTKindConstructors::get_recognition_only_GPR(ValueProperties::kind(pr))) == 0) &&
((Kinds::Behaviour::is_object(ValueProperties::kind(pr))) || ((Kinds::Behaviour::is_object(ValueProperties::kind(pr))) ||
(RTKindConstructors::request_I6_GPR(ValueProperties::kind(pr)) == FALSE))) { (RTKindConstructors::request_I6_GPR(ValueProperties::kind(pr)) == FALSE))) {
StandardProblems::sentence_problem(Task::syntax_tree(), if (Kinds::Behaviour::is_object(ValueProperties::kind(pr)))
_p_(PM_BadReferringProperty), StandardProblems::sentence_problem(Task::syntax_tree(),
"that property is of a kind which I can't recognise in " _p_(PM_ThingReferringProperty),
"typed commands", "the value of that property is itself a kind of object",
"so that it cannot be understand as describing or referring to " "so that it cannot be understand as describing or referring to "
"something. I can understand either/or properties, properties " "something. I can understand either/or properties, properties "
"with a limited list of named possible values, numbers, times " "with a limited list of named possible values, numbers, times "
"of day, or units; but certain built-into-Inform kinds of value " "of day, or units.");
"(like snippet or rulebook, for instance) I can't use."); else
StandardProblems::sentence_problem(Task::syntax_tree(),
_p_(PM_BadReferringProperty),
"that property is of a kind which I can't recognise in "
"typed commands",
"so that it cannot be understand as describing or referring to "
"something. I can understand either/or properties, properties "
"with a limited list of named possible values, numbers, times "
"of day, or units; but certain built-into-Inform kinds of value "
"(like snippet or rulebook, for instance) I can't use.");
} }
if (Visibility::set(pr, subj, level, WHENW) == FALSE) { if (Visibility::set(pr, subj, level, WHENW) == FALSE) {
StandardProblems::sentence_problem(Task::syntax_tree(), StandardProblems::sentence_problem(Task::syntax_tree(),