Re: [swift-evolution] [Pitch] Make the formal type of 'self' consistent in class methods

2016-06-24 Thread Michael Peternell via swift-evolution
I'm not sure if this even requires a proposal. This just looks like an ordinary bug in the language implementation. But if this would become a formal proposal, I will support it. -Michael > Am 23.06.2016 um 21:53 schrieb Slava Pestov via swift-evolution > : > >

Re: [swift-evolution] [Pitch] Make the formal type of 'self' consistent in class methods

2016-06-24 Thread Vladimir.S via swift-evolution
+1. This should be fixed. On 23.06.2016 22:53, Slava Pestov via swift-evolution wrote: Consistent formal type for 'self' in class methods * Proposal: SE-

Re: [swift-evolution] [Pitch] Make the formal type of 'self' consistent in class methods

2016-06-24 Thread plx via swift-evolution
+1; I *really* appreciate taking a proactive approach to eliminating future sources of bizarre “gotcha” moments! > On Jun 23, 2016, at 2:53 PM, Slava Pestov via swift-evolution > wrote: > > Consistent formal type for 'self' in class methods > > Proposal: SE- >

Re: [swift-evolution] [Pitch] Make the formal type of 'self' consistent in class methods

2016-06-23 Thread L. Mihalkovic via swift-evolution
Quick (semi) related question: any particular reason for .Type to be a contextual kwd rather than defined on a protocol? (No concrete def for metatypes?) Regards LM (From mobile) > On Jun 23, 2016, at 11:02 PM, Andrew Trick via swift-evolution > wrote: > > >>> On

Re: [swift-evolution] [Pitch] Make the formal type of 'self' consistent in class methods

2016-06-23 Thread Matthew Johnson via swift-evolution
Sent from my iPad > On Jun 23, 2016, at 3:12 PM, Slava Pestov wrote: > > Great to hear some feedback so quickly, especially about something so mundane. You caught me at the right time I guess. :) This kind of thing is only mundane until your code doesn't behave as you

Re: [swift-evolution] [Pitch] Make the formal type of 'self' consistent in class methods

2016-06-23 Thread Sean Heber via swift-evolution
This is certainly surprisingly behavior to me! +1 l8r Sean > On Jun 23, 2016, at 2:53 PM, Slava Pestov via swift-evolution > wrote: > > Consistent formal type for 'self' in class methods > > • Proposal: SE- > • Author: Slava Pestov > •

Re: [swift-evolution] [Pitch] Make the formal type of 'self' consistent in class methods

2016-06-23 Thread Slava Pestov via swift-evolution
Great to hear some feedback so quickly, especially about something so mundane. I suspect the real reason it doesn’t work this way now is that ‘Self’ is not fully plumbed through. In particular, if a closure captures the ‘Self’ type, IRGen does not properly codegen it, causing compile-time or

Re: [swift-evolution] [Pitch] Make the formal type of 'self' consistent in class methods

2016-06-23 Thread Matthew Johnson via swift-evolution
+1. I have not encountered this issue myself but it looks like something that would cause a lot of head scratching if I had. It is also something that I am unlikely to remember immediately if I run into it in the future. The current behavior appears broken to me. It will be great to have it

[swift-evolution] [Pitch] Make the formal type of 'self' consistent in class methods

2016-06-23 Thread Slava Pestov via swift-evolution
Consistent formal type for 'self' in class methods Proposal: SE- Author: Slava Pestov Status: Awaiting review Review manager: TBD