mirror of
https://github.com/ganelson/inform.git
synced 2024-06-29 05:24:57 +03:00
Fix for Jira bug I7-2182
This commit is contained in:
parent
ef6f3f2c08
commit
606185d8ef
8
inform7/Tests/Test Problems/PM_TableCreatedMapClash.txt
Normal file
8
inform7/Tests/Test Problems/PM_TableCreatedMapClash.txt
Normal file
|
@ -0,0 +1,8 @@
|
|||
Xanadu is a room.
|
||||
|
||||
A length is a kind of value. Some lengths are defined by the Table of lengths.
|
||||
|
||||
Table of lengths
|
||||
length
|
||||
above
|
||||
below
|
|
@ -0,0 +1,16 @@
|
|||
Inform 7 v10.1.0 has started.
|
||||
I've now read your source text, which is 26 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 32164 words long.
|
||||
Problem__ PM_TableCreatedMapClash
|
||||
>--> You wrote 'Some lengths are defined by the Table of lengths' (source
|
||||
text, line 3), and row 1 of the first column of that table is 'above' (source
|
||||
text, line 7), which I ought to create as a new value of a length. But I
|
||||
can't do that: it already has a meaning (it refers to a map direction).
|
||||
Problem__ PM_TableCreatedMapClash
|
||||
>--> You wrote 'Some lengths are defined by the Table of lengths' (source
|
||||
text, line 3), and row 2 of the first column of that table is 'below' (source
|
||||
text, line 8), which I ought to create as a new value of a length. But I
|
||||
can't do that: it already has a meaning (it refers to a map direction).
|
||||
Inform 7 has finished.
|
|
@ -244,7 +244,8 @@ have occurred, but if it does then the creation has worked.
|
|||
@<Issue a problem for trying to create an existing kind as a new instance@>;
|
||||
if ((evaluation) && (Node::is(evaluation, UNKNOWN_NT) == FALSE))
|
||||
@<Issue a problem for trying to create any existing meaning as a new instance@>;
|
||||
|
||||
if ((K_direction) && (<notable-map-noun-phrases>(NW)))
|
||||
@<Issue a problem for trying to create above or below as a new instance@>;
|
||||
Assertions::Creator::tabular_definitions(t);
|
||||
NounPhrases::annotate_by_articles(name_entry);
|
||||
ProblemBuffer::redirect_problem_sentence(current_sentence, name_entry, V->next);
|
||||
|
@ -307,6 +308,20 @@ of the contents.)
|
|||
Problems::issue_problem_end();
|
||||
objections++; continue;
|
||||
|
||||
@<Issue a problem for trying to create above or below as a new instance@> =
|
||||
Problems::quote_source(1, current_sentence);
|
||||
Problems::quote_source(2, name_entry);
|
||||
Problems::quote_kind_of(3, evaluation);
|
||||
Problems::quote_kind(4, K);
|
||||
Problems::quote_number(5, &row_count);
|
||||
StandardProblems::handmade_problem(Task::syntax_tree(), _p_(PM_TableCreatedMapClash));
|
||||
Problems::issue_problem_segment(
|
||||
"You wrote %1, and row %5 of the first column of that table is %2, which "
|
||||
"I ought to create as a new value of %4. But I can't do that: it already "
|
||||
"has a meaning (it refers to a map direction).");
|
||||
Problems::issue_problem_end();
|
||||
objections++; continue;
|
||||
|
||||
@<Issue a problem to say that the creation failed@> =
|
||||
LOG("Eval is $P\n", evaluation);
|
||||
Problems::quote_source(4, name_entry);
|
||||
|
|
|
@ -352,7 +352,10 @@ from the tree.
|
|||
|
||||
@<Perform creation on a CREATED node@> =
|
||||
wording W = Node::get_text(p);
|
||||
if (Wordings::empty(W)) internal_error("CREATED node without name");
|
||||
if (Wordings::empty(W)) {
|
||||
if (problem_count > 0) return; /* to recover from PM_TableDefiningNothing */
|
||||
internal_error("CREATED node without name");
|
||||
}
|
||||
if (<grammatical-gender-marker>(W)) {
|
||||
W = GET_RW(<grammatical-gender-marker>, 1);
|
||||
Annotations::write_int(p, explicit_gender_marker_ANNOT, <<r>> + 1);
|
||||
|
|
|
@ -180,6 +180,9 @@ which hadn't been seen in the wild, so far as we know. But the following are the
|
|||
most important 150 or so, which were indeed reported, and for which issue numbers
|
||||
at our tracker and commits can be identified.
|
||||
|
||||
- Fix for Jira bug [I7-2182](https://inform7.atlassian.net/browse/I7-2182)
|
||||
"Internal error on redefining 'above' or 'below' by table"
|
||||
|
||||
- Fix for Jira bug [I7-2166](https://inform7.atlassian.net/browse/I7-2166)
|
||||
"Projects with no IFID still try to print it in the VERSION command"
|
||||
([commit c1731ec](https://github.com/ganelson/inform/commit/c1731ec3f170c5c6e8aa092275cd323374aed624))
|
||||
|
|
Loading…
Reference in a new issue