Re: [swift-users] Redeclaration of guard variable is ignored at top-level

2016-06-17 Thread Martin R via swift-users
Filed as https://bugs.swift.org/browse/SR-1804. 2016-06-17 7:17 GMT-07:00 Mark Lacey : > > On Jun 16, 2016, at 10:18 PM, Martin R via swift-users > wrote: > > Hi, > > I wonder why the Swift compiler does not complain about the > redeclaration of

Re: [swift-users] Redeclaration of guard variable is ignored at top-level

2016-06-17 Thread Mark Lacey via swift-users
> On Jun 16, 2016, at 10:18 PM, Martin R via swift-users > wrote: > > Hi, > > I wonder why the Swift compiler does not complain about the > redeclaration of `number` after the guard-statement in top-level code: > >// main.swift >import Swift > >guard let

Re: [swift-users] Redeclaration of guard variable is ignored at top-level

2016-06-16 Thread Saagar Jha via swift-users
Looks like a bug…strangely, lldb’s giving number: Int = 5678. On Thu, Jun 16, 2016 at 10:18 PM Martin R via swift-users < swift-users@swift.org> wrote: > Hi, > > I wonder why the Swift compiler does not complain about the > redeclaration of `number` after the guard-statement in top-level code:

[swift-users] Redeclaration of guard variable is ignored at top-level

2016-06-16 Thread Martin R via swift-users
Hi, I wonder why the Swift compiler does not complain about the redeclaration of `number` after the guard-statement in top-level code: // main.swift import Swift guard let number = Int("1234") else { fatalError() } print(number) // Output: 1234 let number = 5678