Re: Confusing error message for nil-indexed C arrays

  • From: Markus Walther <dr.marikos@xxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Sun, 5 Aug 2012 19:38:11 +0200

Great, thanks a lot!

--Markus

On Sun, Aug 5, 2012 at 5:32 PM, Mike Pall <mike-1208@xxxxxxxxxx> wrote:
> Markus Walther wrote:
>> On Fri, Aug 3, 2012 at 11:31 PM, Mike Pall <mike-1208@xxxxxxxxxx> wrote:
>> > Well, the error is generic. What if you index an array with e.g.
>> > 'true' or a table as a key? Would it help to use
>> >
>> >   '%s' cannot be indexed with '%s'
>> > e.g.
>> >   'int [?]' cannot be indexed with 'nil'
>> >
>> > instead?
>>
>> Yes, I think that would be helpful - assuming the 2nd '%s' is
>> instantiated with the type or tostring  of the offending index value.
>
> Fixed in git HEAD.
>
> --Mike
>



-- 
Bond: "Everybody needs a hobby." Villain: "What's yours?" Bond: "Resurrection."

(007: Skyfall Trailer, http://www.youtube.com/watch?v=tveYIIM1qf8#t=1m51s)

Other related posts: