Compiler crash when attempting to write to a "corresponding" table column

Continuing the discussion from Declaring a new table to be populated:

Just noting that I went ahead and tested the “now” lines I previously posted. The corresponding line produces a compiler crash, but the other two work.

> Problem. An internal error has occurred: indirect function call with too many arguments. The current sentence is 'if the player's command includes "lie"'; the error was detected at line 388 of "inter/building-module/Chapter 1/Inter Primitives.w". This should never happen, and I am now halting in abject failure.

Minimal source code reproducing the bug:

Table of Experiments
colour (text)	count (number)	referent (thing)
"red"	3
"green"	4
"blue"	5	yourself
with blank rows for every container.

When play begins:
	showme the contents of Table of Experiments;
	now the colour column of "red" in the Table of Experiments is "yellow";
	now the referent column in row 2 of the Table of Experiments is the slime;
	now the count column corresponding to a colour column of "green" in the Table of Experiments is 7;
	showme the contents of Table of Experiments;

Lab is a room. Slime is a thing.
1 Like

I think your ways of setting the table values aren’t syntactically allowable, though perhaps some are allowable in version 10.n of Inform and I don’t know it? I’m using 6M62.

I switched to 10.n and tried changing different bits of your code one at a time, and this is the least-changed version that compiled:

Lab is a room. Slime is a thing.

Table of Experiments
colour (text)	count (number)	referent (thing)
"red"	3
"green"	4
"blue"	5	yourself
with blank rows for every container.

When play begins:
	showme the contents of Table of Experiments;
	choose a row with colour of "red" in the table of experiments;
	now colour entry is "yellow";
	now the referent in row 2 of the Table of Experiments is the slime;
	choose a row with a colour of "green" in the table of experiments;
	now the count entry is 7;
	showme the contents of Table of Experiments;

-Wade

That’s all fine, but whether or not my version is allowable, it should at least not crash the compiler.

1 Like

Possibly related to I7-2442?

Similar code with same crash/problem message (at the same line of Inter code as well).
Agree that the syntax is illegal, but shouldn’t crash the compiler. It should fail at the I7 stage and give a more helpful message.

Personally, I don’t see any reason why the syntax should be illegal. It makes perfect sense to me. But I could perhaps see an argument that it could be ambiguous (there could be more than one matching column) and thus shouldn’t be allowed…