Re: [swift-users] Static type when expecting dynamic type

2017-02-02 Thread Howard Lovatt via swift-users
Thanks for your prompt responses. Have filed a bug: SR-3840 - Closure picks up static type not dynamic -- Howard. On 3 February 2017 at 08:57, Slava Pestov wrote: > The problem is were not marking the materializeForSet accessor > in DefaultMutableRefe

Re: [swift-users] Static type when expecting dynamic type

2017-02-02 Thread Slava Pestov via swift-users
The problem is were not marking the materializeForSet accessor in DefaultMutableReference.value as an override. Definitely a bug: sil_vtable DefaultMutableReference { #MutableReference.init!initializer.1: _TFC1d23DefaultMutableReferencecfT_GS0_x_ // DefaultMutableReference.init() -> Def

Re: [swift-users] Static type when expecting dynamic type

2017-02-02 Thread Jordan Rose via swift-users
Seems like a bug, and moreover it seems like a regression from Swift 3.0. Mind filing a report at bugs.swift.org ? Thanks! Jordan > On Feb 1, 2017, at 20:49, Howard Lovatt via swift-users > wrote: > > Hi All, > > Anyone know what is going on here: > > //: Closure

[swift-users] Static type when expecting dynamic type

2017-02-01 Thread Howard Lovatt via swift-users
Hi All, Anyone know what is going on here: //: Closure picks up static type not dynamic class MutableReference { init() { guard type(of: self) != MutableReference.self else { fatalError("MutableReference is an abstract class; create a derrivative of Mu