mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Completely mechanical changes: - Explicit @objc in a few places - Some imported APIs changed - For the mix-and-match tests, just test version 4/5 instead of 3/4
16 lines
760 B
Swift
16 lines
760 B
Swift
// RUN: %empty-directory(%t)
|
|
// RUN: %target-swift-frontend -emit-module -emit-module-path %t/OldAndNew.swiftmodule -module-name OldAndNew %S/Inputs/OldAndNew.swift
|
|
// RUN: not %target-swift-frontend -typecheck -I %t -swift-version 4 %s 2>&1 | %FileCheck -check-prefix THREE %s
|
|
// RUN: not %target-swift-frontend -typecheck -I %t -swift-version 5 %s 2>&1 | %FileCheck -check-prefix FOUR %s
|
|
// RUN: %target-swift-ide-test -print-module -module-to-print OldAndNew -source-filename x -I %t | %FileCheck %S/Inputs/OldAndNew.swift
|
|
|
|
import OldAndNew
|
|
|
|
// THREE: 'fiveOnly()' is unavailable
|
|
// THREE: 'fiveOnly()' was introduced in Swift 5.0
|
|
let _ = fiveOnly()
|
|
|
|
// FOUR: 'fourOnly()' is unavailable
|
|
// FOUR: 'fourOnly()' was obsoleted in Swift 5.0
|
|
let _ = fourOnly()
|