On Tue Dec 22 05:30:41 2015, alex.jakime...@gmail.com wrote:
> Code:
> enum Animal (Cat, Dog)
> 
> Result:
> ===SORRY!===
> Cannot invoke this object
> 
> 
> Well, the error message is not so good, but you can say “who is going to do
> that anyway?”. Well, consider this:
> 
> Code:
> enum Animal (Cat => 25, Dog)
> 
> Result:
> ===SORRY!===
> Cannot invoke this object
> 
> Which is just a shorter version of this:
> 
> Code:
> enum Animal (Cat => 25, Dog => 26)
> 
> Result:
> (no output, OK)
> 
> In which case you probably want to do this instead:
> 
> Code:
> enum Bool «:Cat(25) Dog»
> 
> Result:
> (no output, OK, Dog is actually 26)
> 
> 
> Possible solution:
> If there is no way to see what is happening then just any better error
> message than “Cannot invoke this object” (which does not even provide a
> line number) will do.
> If there is a way to see that the user actually wanted to use <> or «» then
> it should suggest that.

We now just report Cat and Dog as undeclared symbols, which makes clear that 
they were interpreted as lookups. This means they get a line number. Turns out 
that:

constant foo = bar;

Did the same kind of blow-up (cannot invoke) rather than reporting bar 
undeclared; I've also fixed that.

Tests for both in S32-exceptions/misc.t.

Reply via email to