Re: [swift-users] Swift 3 Whole Module Optimization Issue

2016-12-23 Thread Jun Zhang via swift-users
This is the bug report: https://bugs.swift.org/browse/SR-3474

On Thu, Dec 22, 2016 at 11:08 AM, Jun Zhang 
wrote:

> Hi, everyone.
>I think I found a swift 3 whole module optimization issue. The code
> below, when building with release configuration and running on an iOS 10
> real device, will always causes a crash.
>
> import UIKit
>> class ViewController: UIViewController {
>> override func viewDidLoad() {
>> super.viewDidLoad()
>> // Do any additional setup after loading the view.
>> super.viewDidLoad()
>>
>> let orderby = "time"
>> let url = "http://www.sample.com/api/index.php?\(orderby)"
>>
>> Log("Request url: \(url)")
>>
>> if let url = URL(string: url) {
>> let request = URLRequest(url: url)
>> print(request)
>> }
>> }
>> override func didReceiveMemoryWarning() {
>> super.didReceiveMemoryWarning()
>> // Dispose of any resources that can be recreated.
>> }
>>
>> }
>> func Log(_ log: String) {
>> //NSLog("%@", log)
>> }
>
>
> You can see the attachment for more detail info.
> Or if you use github, this is the repo:
> https://github.com/zaczh/Swift3ClosureDemo​
>  Swift3ClosureDemo-master.zip
> 
> ​
>
___
swift-users mailing list
swift-users@swift.org
https://lists.swift.org/mailman/listinfo/swift-users


Re: [swift-users] Swift 3 Whole Module Optimization Issue

2016-12-23 Thread Alex Blewitt via swift-users
Can you raise a bug at https://bugs.swift.org  with 
the details, including the crash dump?

Thanks,

Alex

> On 22 Dec 2016, at 02:48, Jun Zhang via swift-users  
> wrote:
> 
> Hi, everyone.
>I think I found a swift 3 whole module optimization issue. The code below, 
> when building with release configuration and running on an iOS 10 real 
> device, will always causes a crash.
> 
> import UIKit
> class ViewController: UIViewController {
> override func viewDidLoad() {
> super.viewDidLoad()
> // Do any additional setup after loading the view.
> super.viewDidLoad()
> 
> let orderby = "time"
> let url = "http://www.sample.com/api/index.php 
> ?\(orderby)"
> 
> Log("Request url: \(url)")
> 
> if let url = URL(string: url) {
> let request = URLRequest(url: url)
> print(request)
> }
> }
> override func didReceiveMemoryWarning() {
> super.didReceiveMemoryWarning()
> // Dispose of any resources that can be recreated.
> }
> 
> }
> func Log(_ log: String) {
> //NSLog("%@", log)
> }
> 
> You can see the attachment for more detail info.
> Or if you use github, this is the repo: 
> https://github.com/zaczh/Swift3ClosureDemo 
> 
> ​
>  Swift3ClosureDemo-master.zip 
> ​
> ___
> swift-users mailing list
> swift-users@swift.org
> https://lists.swift.org/mailman/listinfo/swift-users

___
swift-users mailing list
swift-users@swift.org
https://lists.swift.org/mailman/listinfo/swift-users


Re: [swift-users] Swift 3 Whole Module Optimization Issue

2016-12-21 Thread Joe Groff via swift-users

> On Dec 21, 2016, at 7:08 PM, Jun Zhang via swift-users 
>  wrote:
> 
> Hi, everyone.
>I think I found a swift 3 whole module optimization issue. The code below, 
> when building with release configuration and running on an iOS 10 real 
> device, will always causes a crash.
> 
> import UIKit
> class ViewController: UIViewController {
> override func viewDidLoad() {
> super.viewDidLoad()
> // Do any additional setup after loading the view.
> super.viewDidLoad()
> 
> let orderby = "time"
> let url = "http://www.sample.com/api/index.php?\(orderby)"
> 
> Log("Request url: \(url)")
> 
> if let url = URL(string: url) {
> let request = URLRequest(url: url)
> print(request)
> }
> }
> override func didReceiveMemoryWarning() {
> super.didReceiveMemoryWarning()
> // Dispose of any resources that can be recreated.
> }
> 
> }
> func Log(_ log: String) {
> //NSLog("%@", log)
> }
> 
> You can see the attachment for more detail info.
> Or if you use github, this is the repo: 
> https://github.com/zaczh/Swift3ClosureDemo​
>  Swift3ClosureDemo-master.zip
> ​
Thanks for the report! Please file it on bugs.swift.org if you have a moment.

-Joe
___
swift-users mailing list
swift-users@swift.org
https://lists.swift.org/mailman/listinfo/swift-users