// Import as subscript
float Point3DGetPointAtIndex(Point3D point, int idx)
__attribute__((swift_name("getter:Point3D.subscript(self:_:)")));
void Point3DSetPointAtIndex(Point3D point, int idx, float val)
__attribute__((swift_name("setter:Point3D.subscript(self:_:newValue:)")));
the compiler does not issue warnings anymore. However, the functions are still not imported as subscript getter/setter. (Tested with Xcode 8 beta 2).
···
On 11 Jul 2016, at 11:48, Martin R <martinr448@gmail.com> wrote:
Subscript is not yet implemented. I will hopefully get that in time for Swift 3. Requiring “newValue” isn’t as well for properties, though it’s coincidentally allowed as a perfectly valid argument label for the setter.
···
On Jul 11, 2016, at 4:59 AM, Martin R via swift-users <swift-users@swift.org> wrote:
Minimal progress: With
// Import as subscript
float Point3DGetPointAtIndex(Point3D point, int idx)
__attribute__((swift_name("getter:Point3D.subscript(self:_:)")));
void Point3DSetPointAtIndex(Point3D point, int idx, float val)
__attribute__((swift_name("setter:Point3D.subscript(self:_:newValue:)")));
the compiler does not issue warnings anymore. However, the functions are still not imported as subscript getter/setter. (Tested with Xcode 8 beta 2).
On 11 Jul 2016, at 11:48, Martin R <martinr448@gmail.com> wrote: