slice2js problem with structs
I'm using Ice 3.6.2 and I have noticed an issue when slice2js produces code for a proxy method which takes a struct as an input parameter. The JS code that is produced is:
"updatePointSource": [, 2, 2, , , , [, [DataSetIce.PointSource]], ,
], , ]
where DataSetIce.PointSource is an Ice struct. This produces an unknown type error when the JS code is executed.
However, if I put quotes around it like slice2js does for classes then it works so it looks like:
"updatePointSource": [, 2, 2, , , , [, ["DataSetIce.PointSource"]], ,
], , ]
Looking in the slice2js source code on GitHub, Gen.cpp at line 2063-2067 is where this JS code is generated.
Your suggested fix sounds fine but I'd like to make sure I understand why it's required. Could you post a stripped down version of the Slice that exhibits this problem?
Given that structs can't be forwarded declared (unlike classes), it's not clear to me why the struct type isn't defined when used as an operation parameter.