Page 1 of 1

Passing key of an array as inout param doesn't work

Posted: Wed May 27, 2015 3:15 pm
by trevordevore
The compiler doesn't like this:

Code: Select all

handler myHandler(inout xVar as Path)
   ...
end handler

Code: Select all

myHandler(mVar[1]["path"])
Is this a bug or a known limitation?

Re: Passing key of an array as inout param doesn't work

Posted: Wed May 27, 2015 3:49 pm
by LCMark
I think that's called a bug in the compiler (at line 1392 of generate.g in fact) ;)

Re: Passing key of an array as inout param doesn't work

Posted: Wed May 27, 2015 3:50 pm
by trevordevore
Shall I report or do you have it taken care of?

Re: Passing key of an array as inout param doesn't work

Posted: Wed May 27, 2015 4:17 pm
by LCMark
I'm currently looking into it - hopefully it won't be difficult to fix.

Re: Passing key of an array as inout param doesn't work

Posted: Wed May 27, 2015 5:21 pm
by LCMark
I've filed this as bug http://quality.runrev.com/show_bug.cgi?id=15429 - single indirection is fine, more than single indirection does not work at present.

Re: Passing key of an array as inout param doesn't work

Posted: Wed May 27, 2015 5:23 pm
by trevordevore
Thanks @LCMark.