mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Find all the usages of `--enable-experimental-feature` or `--enable-upcoming-feature` in the tests and replace some of the `REQUIRES: asserts` to use `REQUIRES: swift-feature-Foo` instead, which should correctly apply to depending on the asserts/noasserts mode of the toolchain for each feature. Remove some comments that talked about enabling asserts since they don't apply anymore (but I might had miss some). All this was done with an automated script, so some formatting weirdness might happen, but I hope I fixed most of those. There might be some tests that were `REQUIRES: asserts` that might run in `noasserts` toolchains now. This will normally be because their feature went from experimental to upcoming/base and the tests were not updated.
17 lines
1.0 KiB
Swift
17 lines
1.0 KiB
Swift
// RUN: %target-swift-frontend -enable-experimental-feature SymbolLinkageMarkers -parse-as-library -emit-sil %s -o /dev/null -verify
|
|
|
|
// REQUIRES: swift_in_compiler
|
|
// REQUIRES: swift_feature_SymbolLinkageMarkers
|
|
|
|
@_silgen_name("g0") var g0: Int = 1
|
|
@_silgen_name("g1") var g1: (Int, Int) = (1, 2)
|
|
@_silgen_name("g2") var g2: [Int] = [1, 2, 3] // expected-error {{global variable must be a compile-time constant to use @_silgen_name attribute}}
|
|
@_silgen_name("g3") var g3: [Int:Int] = [:] // expected-error {{global variable must be a compile-time constant to use @_silgen_name attribute}}
|
|
@_silgen_name("g4") var g4: UInt = 42
|
|
@_silgen_name("g5") var g5: String = "hello" // expected-error {{global variable must be a compile-time constant to use @_silgen_name attribute}}
|
|
@_silgen_name("g6") var g6: Any = 1 // expected-error {{global variable must be a compile-time constant to use @_silgen_name attribute}}
|
|
@_silgen_name("g7") var g7: UInt8 = 42
|
|
@_silgen_name("g8") var g8: Int = 5 * 5
|
|
|
|
@_silgen_name("fwd1") var fwd1: Int
|