curiousdannii-testing / inform7-imported-bugs

0 stars 0 forks source link

[I7-1857] [Mantis 1893] printing name of container selects article based on article of last child (Z-code only) #227

Closed curiousdannii-testing closed 2 years ago

curiousdannii-testing commented 2 years ago

Reported by : vlaviano

Description :

The printing the name of a thing activity for a container selects its indefinite article based on the indefinite article of its last child. For example, the test program describes the bowl as "an fruit bowl" if the apple is its least recently added child and "a fruit bowl" if the banana is its least recently added child.

Steps to reproduce :

Test Chamber is a room.

The fruit bowl is a container in Test Chamber.

An apple and a banana are edible things in Test Chamber.

Rule for printing the name of the bowl while listing contents of a room:
    say "fruit bowl (offering [if bowl contains nothing]nothing[else][a list of things in bowl including contents][end if])";
    omit contents in listing.

Test apple-first with "put apple in bowl / l / put banana in bowl / l / take apple / l / take banana / l".
Test banana-first with "put banana in bowl / l / put apple in bowl / l / take banana / l / take apple / l".
Test me with "test apple-first / test banana-first".

Additional information :

This appears to be a regression of issue 1155.

imported from: [Mantis 1893] printing name of container selects article based on article of last child (Z-code only)
  • status: Closed
  • resolution: Cannot Reproduce
  • resolved: 2022-04-14T12:38:07+10:00
  • imported: 2022/01/10
curiousdannii-testing commented 2 years ago

557058:4c095ffd-6d6f-47ce-9e73-77c613347b86:

Comment by zarf :
I'm not seeing this.


Test Case
An Interactive Fiction by Andrew Plotkin
Release 1 / Serial number 160411 / Inform 7 build 6M62 (I6/v6.33 lib 6/12N) SD

Test Chamber
You can see a fruit bowl (offering nothing), an apple and a banana here.

>test me
(Testing.)

>[1] test apple-first
(Testing.)

>[2] put apple in bowl
(first taking the apple)
You put the apple into the fruit bowl.

>[3] l
Test Chamber
You can see a fruit bowl (offering an apple) and a banana here.

>[4] put banana in bowl
(first taking the banana)
You put the banana into the fruit bowl.

>[5] l
Test Chamber
You can see a fruit bowl (offering a banana and an apple) here.

>[6] take apple
Taken.

>[7] l
Test Chamber
You can see a fruit bowl (offering a banana) here.

>[8] take banana
Taken.

>[9] l
Test Chamber
You can see a fruit bowl (offering nothing) here.

>[10] test banana-first
(Testing.)

>[11] put banana in bowl
You put the banana into the fruit bowl.

>[12] l
Test Chamber
You can see a fruit bowl (offering a banana) here.

>[13] put apple in bowl
You put the apple into the fruit bowl.

>[14] l
Test Chamber
You can see a fruit bowl (offering an apple and a banana) here.

>[15] take banana
Taken.

>[16] l
Test Chamber
You can see a fruit bowl (offering an apple) here.

>[17] take apple
Taken.

>[18] l
Test Chamber
You can see a fruit bowl (offering nothing) here.

curiousdannii-testing commented 2 years ago

557058:4c095ffd-6d6f-47ce-9e73-77c613347b86:

Comment by zarf :
Aha. Yeah, bug is Z-code only.

curiousdannii-testing commented 2 years ago

557058:4c095ffd-6d6f-47ce-9e73-77c613347b86:

Comment by zarf :
The problem is visible when the apple is the last or only object listed in the bowl. (Least recently added, as the original report says.)

curiousdannii-testing commented 2 years ago

557058:4c095ffd-6d6f-47ce-9e73-77c613347b86:

Comment by zarf :
I'm marking bug 1155 (fixed in 6L02) as related. Not sure it really is.

curiousdannii-testing commented 2 years ago

557058:4c095ffd-6d6f-47ce-9e73-77c613347b86:

Comment by vlaviano :
This is the full output when I run the test:

Welcome
An Interactive Fiction
Release 1 / Serial number 160411 / Inform 7 build 6M62 (I6/v6.33 lib 6/12N) SD

Test Chamber
You can see a fruit bowl (offering nothing), an apple and a banana here.

>test me
(Testing.)

>[1] test apple-first
(Testing.)

>[2] put apple in bowl
(first taking the apple)
You put the apple into the fruit bowl.

>[3] l
Test Chamber
You can see an fruit bowl (offering an apple) and a banana here.

>[4] put banana in bowl
(first taking the banana)
You put the banana into the fruit bowl.

>[5] l
Test Chamber
You can see an fruit bowl (offering a banana and an apple) here.

>[6] take apple
Taken.

>[7] l
Test Chamber
You can see a fruit bowl (offering a banana) here.

>[8] take banana
Taken.

>[9] l
Test Chamber
You can see a fruit bowl (offering nothing) here.

>[10] test banana-first
(Testing.)

>[11] put banana in bowl
You put the banana into the fruit bowl.

>[12] l
Test Chamber
You can see a fruit bowl (offering a banana) here.

>[13] put apple in bowl
You put the apple into the fruit bowl.

>[14] l
Test Chamber
You can see a fruit bowl (offering an apple and a banana) here.

>[15] take banana
Taken.

>[16] l
Test Chamber
You can see an fruit bowl (offering an apple) here.

>[17] take apple
Taken.

>[18] l
Test Chamber
You can see a fruit bowl (offering nothing) here.

curiousdannii-testing commented 2 years ago

557058:4c095ffd-6d6f-47ce-9e73-77c613347b86:

Comment by vlaviano :
I have ready access to the intermediate I6 code if there's a piece that you want to compare.

curiousdannii-testing commented 2 years ago

557058:4c095ffd-6d6f-47ce-9e73-77c613347b86:

Comment by vlaviano :
I created a fresh project, pasted in the test code, and no longer see this issue. There must have been some artifacts from an earlier version of I7 associated with the test project into which I'd been pasting code. Not sure if that in itself constitutes an issue: open old project, delete all code, paste in new code, compile with 6M62 – shouldn't we see 6M62 behavior?

curiousdannii-testing commented 2 years ago

557058:4c095ffd-6d6f-47ce-9e73-77c613347b86:

Comment by vlaviano :
Ok, final note, I think. The old project was set to compile to z8. The new project, by default, compiles to glulx. If I change the new project's setting to z8, the issue manifests.