Re: [swift-evolution] Subscripts assignable to closure vars

2017-09-16 Thread Joanna Carter via swift-evolution
Hi Jordan > Le 15 sept. 2017 à 23:55, Jordan Rose a écrit : > > The crash is already fixed in master, thanks to Alex Hoppen's work on making > actual subscripts distinct from the name "subscript". > > I think John's right that this should not be allowed. After all, a subscript > may have both

Re: [swift-evolution] Subscripts assignable to closure vars

2017-09-15 Thread Jordan Rose via swift-evolution
> On Sep 15, 2017, at 13:00, John McCall via swift-evolution > wrote: > >> >> On Sep 15, 2017, at 3:45 PM, Joanna Carter via swift-evolution >> mailto:swift-evolution@swift.org>> wrote: >> >> Just came across this. >> >> I want to be able to hold onto the reference to a subscript "method"

Re: [swift-evolution] Subscripts assignable to closure vars

2017-09-15 Thread John McCall via swift-evolution
> On Sep 15, 2017, at 3:45 PM, Joanna Carter via swift-evolution > wrote: > > Just came across this. > > I want to be able to hold onto the reference to a subscript "method" for > later use. > > Assigning the subscript to a var in the init of a type raises a segmentation > fault. > > Shoul

[swift-evolution] Subscripts assignable to closure vars

2017-09-15 Thread Joanna Carter via swift-evolution
Just came across this. I want to be able to hold onto the reference to a subscript "method" for later use. Assigning the subscript to a var in the init of a type raises a segmentation fault. Should this - could this - be allowed? protocol DataProvider { associatedtype ItemType subscrip