It might have something to do with
`setSubscriptee`
with seems from the implementation is a `mutating` operation.
If you comment it out, or just give it a empty callback, it will pass
compile.
Kyle
On Tue, Mar 22, 2016 at 6:23 AM Howard Lovatt via swift-users <
swift-users@swift.org> wrote:
You can not mutate a array itself in a
`var asScriptable`
you might be able to accomplish such with a function.
struct AllSubscriptable {
let setSubscriptee: (index: Index, element: E) -> Void
}
extension Array {
mutating func asScriptable() -> AllSubscriptable {
func sub(key:In
Hi,
I don't understand your comment, can you explain some more please?
Thanks,
-- Howard.
On Monday, 21 March 2016, zh ao wrote:
> You protocol is not defined properly.
>
> On Mon, Mar 21, 2016 at 7:08 AM, Howard Lovatt via swift-users <
> swift-users@swift.org
> > wrote:
>
>> HI,
>>
>> Does
HI,
Does anyone know what is happening here:
protocol Subscriptable {
associatedtype Element
associatedtype Index
var firstIndex: Index { get }
var lastIndex: Index { get }
subscript(index: Index) -> Element { get set }
}
struct AllSubscriptable: Subscriptable {
t