curiousdannii-testing / inform7-imported-bugs

0 stars 0 forks source link

[I7-1083] [Mantis 1116] Unnamed creations with properties require specific, under-documented wording. #1001

Closed curiousdannii-testing closed 2 years ago

curiousdannii-testing commented 2 years ago

Reported by : alex

Description :

Does (or rather, fails to do) what it says on the tin. Although the proper wording for creating unnamed objects is documented when trying to compile "A red tile is in World," using "contains" causes Inform to flat-out deny all understanding and suggest an invalid syntax - while without an adjective present, it compiles without issue.

The problem message:

Steps to reproduce :

A colour is a kind of value. The colours are red and blue.

A tile is a kind of thing. A tile has a colour.

World is a room.

In World is a red tile. [Compiles]
World contains a red tile. [Breaks]

Additional information :

"You wrote 'World contains a red tile' : but this description of a relationship makes no sense to me, and should be something like 'X is in Y' (or 'on' or 'part of Y'); or else 'X is here' or 'X is east of Y'."

imported from: [Mantis 1116] Unnamed creations with properties require specific, under-documented wording.
  • status: Closed
  • resolution: Resolved
  • resolved: 2022-04-07T04:55:32+10:00
  • imported: 2022/01/10
curiousdannii-testing commented 2 years ago

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

Comment by graham :
Took a while to track down, but it was only a forgotten case in the assertion reader; Inform correctly parsed the sentence "World contains a red tile", but failed to instantiate "tile".

curiousdannii-testing commented 2 years ago

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

Comment by zarf :
There are a couple of different variables here... I tried all of the following cases. The intent is that "red tile" should create a red tile instance, "tile" should create a tile instance of the default color, and "nontile" should create a thing instance called "nontile".

There is a red tile in the World.
There is a tile in the World.
There is a nontile in the World.

In World is a red tile.
In World is a tile.
In World is a nontile.

The World contains a red tile. [fails, as described above]
The World contains a tile.
The World contains a nontile.

Only the one case fails; the other eight compile as expected. So it seems to me that that case should succeed.

I'm not sure what case that problem message is intended to handle, though.

curiousdannii-testing commented 2 years ago

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

Comment by zarf :
...looks like it is intended to deal with:

A red tile is in the World. [does not compile]
A tile is in the World. [does not compile]

The problem message is "You wrote 'A red tile is in the World': but something described only by its kind should not be given a specific place or role in the world, to avoid ambiguity. ... though more specific ones like 'a car called Genevieve is in the garage' are fine, as is the reverse, 'In the garage is a car.'"

(As adumbrated in the original bug description, above.)