Skip to content

--warning (@noescape moved to parameter) #268

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 21, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Sources/POSIX/mkdtemp.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import func libc.rmdir
- Note: We only call rmdir() on the directory once done, it is up to
you to recursively delete the contents and thus ensure the rmdir succeeds
*/
public func mkdtemp<T>(_ template: String, prefix: String! = nil, @noescape body: (String) throws -> T) rethrows -> T {
public func mkdtemp<T>(_ template: String, prefix: String! = nil, body: @noescape(String) throws -> T) rethrows -> T {
var prefix = prefix
if prefix == nil { prefix = getenv("TMPDIR") ?? "/tmp/" }
if !prefix.hasSuffix("/") {
Expand Down
4 changes: 2 additions & 2 deletions Tests/Functional/Utilities.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import class Foundation.NSBundle
#endif


func fixture(name fixtureName: String, tags: [String] = [], file: StaticString = #file, line: UInt = #line, @noescape body: (String) throws -> Void) {
func fixture(name fixtureName: String, tags: [String] = [], file: StaticString = #file, line: UInt = #line, body: @noescape(String) throws -> Void) {

func gsub(_ input: String) -> String {
return input.characters.split(separator: "/").map(String.init).joined(separator: "_")
Expand Down Expand Up @@ -155,7 +155,7 @@ func executeSwiftBuild(_ chdir: String, configuration: Configuration = .Debug, p
}
}

func mktmpdir(_ file: StaticString = #file, line: UInt = #line, @noescape body: (String) throws -> Void) {
func mktmpdir(_ file: StaticString = #file, line: UInt = #line, body: @noescape(String) throws -> Void) {
do {
try POSIX.mkdtemp("spm-tests") { dir in
defer { _ = try? rmtree(dir) }
Expand Down
2 changes: 1 addition & 1 deletion Tests/Functional/ValidLayoutTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ class ValidLayoutsTestCase: XCTestCase {
//MARK: Utility

extension ValidLayoutsTestCase {
func runLayoutFixture(name: String, line: UInt = #line, @noescape body: (String) throws -> Void) {
func runLayoutFixture(name: String, line: UInt = #line, body: @noescape(String) throws -> Void) {
let name = "ValidLayouts/\(name)"

// 1. Rooted layout
Expand Down
2 changes: 1 addition & 1 deletion Tests/PackageDescription/VersionTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import XCTest
class VersionTests: XCTestCase {

func testEquality() {
func test(@autoclosure _ v: () -> Version) {
func test( _ v: @autoclosure() -> Version) {
XCTAssertEqual(v(), v())
}

Expand Down
2 changes: 1 addition & 1 deletion Tests/Xcodeproj/GenerateXcodeprojTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import XCTest


// copy pasta
func mktmpdir(_ file: StaticString = #file, line: UInt = #line, @noescape body: (String) throws -> Void) {
func mktmpdir(_ file: StaticString = #file, line: UInt = #line, body: @noescape(String) throws -> Void) {
do {
try POSIX.mkdtemp("spm-tests") { dir in
defer { _ = try? rmtree(dir) }
Expand Down