mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
This involved adding a new substitution called %api_diff_data_dir that when building against a host toolchain, looks in the host toolchain (next to swiftc) rather than in the resource dir. The reason why I need to do this is this allows me to perform a stdlib stage2 build without needing to build swift itself. The only interesting changes here are that I had to add %api_diff_data_dir to a bunch of normal/expected tests and also add %api_diff_data_dir's length to the offsets in rdar31892850.swift.
16 lines
853 B
Swift
16 lines
853 B
Swift
// RUN: %target-swift-frontend -typecheck %s -swift-version 4 %api_diff_data_dir
|
|
// RUN: %empty-directory(%t) && %target-swift-frontend -c -update-code -primary-file %s -emit-migrated-file-path %t/no_var_to_let.swift.result -swift-version 4 -o /dev/null %api_diff_data_dir
|
|
// RUN: %empty-directory(%t) && %target-swift-frontend -c -update-code -primary-file %s -emit-migrated-file-path %t/no_var_to_let.swift.result -swift-version 4 -o /dev/null %api_diff_data_dir
|
|
// RUN: %diff -u %s %t/no_var_to_let.swift.result
|
|
// RUN: %target-swift-frontend -typecheck %s -swift-version 5 %api_diff_data_dir
|
|
|
|
// Note that the diff run line indicates that there should be no change.
|
|
|
|
// The compiler should not suggest `let` instead of `var` here because
|
|
// it is a compile error to say `for let ...`.
|
|
// rdar://problem/32390726
|
|
|
|
for var i in 0..<10 {
|
|
_ = i + 1
|
|
}
|