[swift-users] Closure "shadowing" functions.

Chris Lattner clattner at apple.com
Fri Jan 8 13:29:52 CST 2016


> On Jan 8, 2016, at 11:28 AM, Wallacy <wallacyf at gmail.com> wrote:
> 
> File a bug on bugs.swift.org <http://bugs.swift.org/> is enough?

That would be great, thanks!

-Chris

> 
> Em sex, 8 de jan de 2016 às 17:08, Chris Lattner <clattner at apple.com <mailto:clattner at apple.com>> escreveu:
> 
> > On Jan 8, 2016, at 9:08 AM, Jens Alfke via swift-users <swift-users at swift.org <mailto:swift-users at swift.org>> wrote:
> >
> >
> >> On Jan 8, 2016, at 4:24 AM, Wallacy via swift-users <swift-users at swift.org <mailto:swift-users at swift.org>> wrote:
> >>
> >> class iClass{
> >>    let myProperty:(String)->() = { value in
> >>        print("1: \(value)");
> >>    }
> >>    func myProperty(value: String)->() {
> >>        print("2: \(value)");
> >>    }
> >> }
> >
> > I’m surprised Swift even allows you to declare a property and a method with the same name.
> 
> Agreed, this seems like a bug in the redeclaration checking logic.
> 
> -Chris
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-users/attachments/20160108/2dfe6546/attachment.html>


More information about the swift-users mailing list