curiousdannii-testing / inform7-imported-bugs

0 stars 0 forks source link

[I7-2047] [Mantis 2084] understanding something by a thing-valued property yields a misleading error message #37

Closed curiousdannii-testing closed 2 years ago

curiousdannii-testing commented 2 years ago

Reported by : mattweiner

Description :

When using Understanding as a property with a thing-valued property, Inform throws a compiler error that claims that the property is of a kind which can't be recognised in typed commands. Clearly, things can in general be recognized in typed commands.

This is surely intended behavior, as the error has a list of acceptable properties that does not include things (and allowing things would probably lead to nightmarish regresses if not infinite loops), but the error is a bit jarring, as things are not like snippets and rulebooks.

Steps to reproduce :

Lab is a room.

A marker is a kind of thing. A marker has a thing called the markee.

Understand the markee property as referring to a marker.

The rock is a thing in the lab. The rockmarker is a marker in the Lab. The markee of the rockmarker is the rock.

Additional information :

Error message: Problem. You wrote 'Understand the markee property as referring to a marker' : but 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.
See the manual: 17.15 > 17.15. Understanding things by their properties

imported from: [Mantis 2084] understanding something by a thing-valued property yields a misleading error message
  • status: Closed
  • resolution: Resolved
  • resolved: 2022-04-10T04:26:30+10:00
  • imported: 2022/01/10
curiousdannii-testing commented 2 years ago

61eedb62875fc10070240916:

Fixed via this commit: https://github.com/ganelson/inform/commit/6a6aa005cedc779604a704f11ca75d00ddbc998f

Comment by Graham Nelson:
A new problem message now gives a better explanation of this case.