Re: [royale-compiler] 01/03: fix bracket access of XML/XMLList

2018-10-07 Thread Harbs
I don’t have time right now, but I added an issue so we shouldn’t forget about it… > On Oct 7, 2018, at 5:38 PM, Alex Harui wrote: > > Then add tests for string expressions. I thought I'd already done that. I > would expect that Tour De Flex is now broken. I've been trying to fix the >

Re: [royale-compiler] 01/03: fix bracket access of XML/XMLList

2018-10-07 Thread Alex Harui
Then add tests for string expressions. I thought I'd already done that. I would expect that Tour De Flex is now broken. I've been trying to fix the compile to get TDF to work. IExpressionNode.resolveType() should return the type of a function. See the Javadoc for it. -Alex On 10/7/18,

Re: [royale-compiler] 01/03: fix bracket access of XML/XMLList

2018-10-07 Thread Harbs
I just pushed a change to the compiler to swap around the check to check if the type is a string instead of testing if it’s not a number. This fixes number expressions, but likely breaks string expressions. I don’t know how to get the evaluated type of the whole expression. At least all

Re: [royale-compiler] 01/03: fix bracket access of XML/XMLList

2018-10-03 Thread Harbs
OK. I added some test cases for XMLList indexed access and assignment. One of those tests passed before your change and is now failing. I think this is a summary of the cases we need to deal with (and we probably need more test cases…) Given: var xml:XML = var baz:XMLList = foo.baz; baz =

Re: [royale-compiler] 01/03: fix bracket access of XML/XMLList

2018-10-02 Thread Alex Harui
The recommended practice is to add a test case and make sure it fails appropriately. Then set @ignore on it before committing so it doesn't break the build. Whoever works on the fix can remove the @ignore locally when working on a fix I thought there were already test cases for handling

Re: [royale-compiler] 01/03: fix bracket access of XML/XMLList

2018-10-02 Thread Harbs
I guess I can add a test case, but that’ll make the build fail. I’m not sure what to propose for a fix though. Any indexed (i.e. Number, int or uint type) access should always remain bracketed access. .child() seems wrong for assignment in any case. If anything it should be .setChild(), but

Re: [royale-compiler] 01/03: fix bracket access of XML/XMLList

2018-10-02 Thread Alex Harui
Add a test case to the test suite, propose the fix or ask for help on it. -Alex On 10/2/18, 1:03 AM, "Harbs" wrote: I don’t know the reason for this change, but this broke bracket access in XMLList. myList[myList.length()] = xml should be output unchanged. It’s now

Re: [royale-compiler] 01/03: fix bracket access of XML/XMLList

2018-10-02 Thread Harbs
I don’t know the reason for this change, but this broke bracket access in XMLList. myList[myList.length()] = xml should be output unchanged. It’s now output as: myList.child(myList.length()) = xml That’s wrong… Harbs > On Sep 28, 2018, at 6:34 AM, aha...@apache.org wrote: > > This is an