Xcode-beta (7A152u): Typelias cannot have a function parameter with @autoclosure attribute

Originator:owensd
Number:rdar://21776390 Date Originated:10-Jul-2015 04:16 PM
Status:Open Resolved:
Product:Developer Tools Product Version:Xcode-beta (7A152u)
Classification:Other Bug Reproducible:Always
 
I want to create a function typealias in the form:

    typealias Handler = (@autoclosure condition: () -> Bool, @autoclosure _ message: () -> String, file: StaticString, line: UWord) -> ()

However, this is a compiler error.

Defining the func:

    func f(@autoclosure condition: () -> Bool, @autoclosure _ message: () -> String, file: StaticString, line: UWord) -> (){ … }

This of course works.

Unless I just don’t understand something, it seems the typealias should be valid as well.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!