content
stringlengths
1
103k
path
stringlengths
8
216
filename
stringlengths
2
179
language
stringclasses
15 values
size_bytes
int64
2
189k
quality_score
float64
0.5
0.95
complexity
float64
0
1
documentation_ratio
float64
0
1
repository
stringclasses
5 values
stars
int64
0
1k
created_date
stringdate
2023-07-10 19:21:08
2025-07-09 19:11:45
license
stringclasses
4 values
is_test
bool
2 classes
file_hash
stringlengths
32
32
// RUN: %swift -typecheck -verify -parse-stdlib -module-name Swift -target x86_64-apple-macosx10.10 %s\n\n// Fake declarations of some standard library features for -parse-stdlib.\nprecedencegroup AssignmentPrecedence {}\nenum Optional<T> {\n case none\n case some(T)\n}\n\n\n@available(OSX, introduced: 10.5, deprecat...
dataset_sample\swift\apple_swift\test\attr\attr_availability_osx.swift
attr_availability_osx.swift
Swift
8,443
0.95
0.063348
0.101796
vue-tools
451
2024-07-13T12:05:55.426062
Apache-2.0
true
0182b31855b2ff8828e844d15ee6478e
// RUN: %target-typecheck-verify-swift\n\n@available(swift 3.0)\nfunc foo() {\n}\n\n@available(swift 3.0, *) // expected-error {{Swift version availability must be specified alone}}\nfunc foo2() {\n}\n\n@available(swift 3.0, iOS 10, *) // expected-error {{Swift version availability must be specified alone}}\nfunc bar()...
dataset_sample\swift\apple_swift\test\attr\attr_availability_swift.swift
attr_availability_swift.swift
Swift
1,882
0.95
0.044776
0.037736
vue-tools
557
2024-07-12T00:15:16.871549
MIT
true
f8446845b5ed5b04b2c933fceab1bca1
// RUN: %empty-directory(%t)\n// RUN: %target-swift-frontend -emit-module -emit-module-path %t/PackageDescription.swiftmodule -module-name PackageDescription %S/Inputs/PackageDescription.swift \n// RUN: not %target-swift-frontend -typecheck -I %t -package-description-version 4.2 %s 2>&1 | %FileCheck -check-prefix FOURT...
dataset_sample\swift\apple_swift\test\attr\attr_availability_swiftpm_deserialize.swift
attr_availability_swiftpm_deserialize.swift
Swift
1,047
0.95
0
0.6875
vue-tools
682
2024-10-19T02:43:44.627693
Apache-2.0
true
5adadc6f5a494625b56997492f597174
// RUN: %target-typecheck-verify-swift -package-description-version 4.0\n\n@available(_PackageDescription 3)\nfunc shortThree() {}\n\n@available(_PackageDescription, introduced: 3.0)\nfunc threePointOh() {}\n\n@available(_PackageDescription, introduced: 3.0, obsoleted: 4.0)\nfunc threePointOhOnly() {} // expected-note ...
dataset_sample\swift\apple_swift\test\attr\attr_availability_swiftpm_v4.swift
attr_availability_swiftpm_v4.swift
Swift
3,384
0.95
0.056818
0.032258
awesome-app
669
2023-10-06T23:27:27.330369
MIT
true
481047a258568381e9037b362ffef8fc
// RUN: %empty-directory(%t)\n// RUN: %target-swift-frontend -emit-module -emit-module-path %t/OldAndNew.swiftmodule -module-name OldAndNew %S/Inputs/OldAndNew.swift \n// RUN: not %target-swift-frontend -typecheck -I %t -swift-version 4 %s 2>&1 | %FileCheck -check-prefix THREE %s\n// RUN: not %target-swift-frontend -ty...
dataset_sample\swift\apple_swift\test\attr\attr_availability_swift_deserialize.swift
attr_availability_swift_deserialize.swift
Swift
760
0.95
0
0.75
vue-tools
693
2024-05-14T15:04:16.565307
MIT
true
8af168a99b551277686129c8ff4cebf9
// RUN: %target-typecheck-verify-swift -swift-version 4\n\n@available(swift 3)\nfunc swiftShortThree() {}\n\n@available(swift 3.0)\nfunc swiftShortThreePointOh() {}\n\n@available(swift, introduced: 3.0)\nfunc swiftThreePointOh() {}\n\n@available(swift, introduced: 3.0, obsoleted: 4.0)\nfunc swiftThreePointOhOnly() {} /...
dataset_sample\swift\apple_swift\test\attr\attr_availability_swift_v4.swift
attr_availability_swift_v4.swift
Swift
2,242
0.95
0.038462
0.017857
python-kit
149
2023-11-05T12:51:16.042970
BSD-3-Clause
true
a78ebeffc029927980fd24e71c121219
// RUN: %target-typecheck-verify-swift -parse-as-library\n\n// Allow referencing unavailable API in situations where the caller is marked unavailable in the same circumstances.\n\nstruct AlwaysAvailable {}\n\n@available(*, unavailable)\nstruct NeverAvailable {} // expected-note * {{'NeverAvailable' has been explicitly ...
dataset_sample\swift\apple_swift\test\attr\attr_availability_transitive.swift
attr_availability_transitive.swift
Swift
12,665
0.95
0.003175
0.032967
react-lib
102
2025-06-30T23:38:58.623620
Apache-2.0
true
6315a0f75ae085a4ad8bf6326523e61c
// RUN: %target-typecheck-verify-swift\n// REQUIRES: OS=ios\n\n// Allow referencing unavailable API in situations where the caller is marked unavailable in the same circumstances.\n\n@available(iOS, unavailable)\nfunc ios() {} // expected-note 2{{'ios()' has been explicitly marked unavailable here}}\n\n@available(iOSAp...
dataset_sample\swift\apple_swift\test\attr\attr_availability_transitive_ios.swift
attr_availability_transitive_ios.swift
Swift
1,064
0.8
0.054054
0.103448
vue-tools
554
2024-05-25T18:35:32.028350
Apache-2.0
true
6908c765878d3f5771d2dc6e5a14c577
// RUN: %target-typecheck-verify-swift -application-extension\n// RUN: %target-typecheck-verify-swift -application-extension-library\n// REQUIRES: OS=ios\n\n// Allow referencing unavailable API in situations where the caller is marked unavailable in the same circumstances.\n\n@available(iOS, unavailable)\nfunc ios() {}...
dataset_sample\swift\apple_swift\test\attr\attr_availability_transitive_ios_appext.swift
attr_availability_transitive_ios_appext.swift
Swift
1,127
0.8
0
0.133333
node-utils
440
2023-07-16T07:51:03.624906
Apache-2.0
true
64346848d0fb390d7073c1e2e311d6ab
// RUN: %target-typecheck-verify-swift\n// REQUIRES: OS=macosx\n\n// Make sure that a compatible unavailable wrapping doesn't allow referencing declarations that are completely unavailable.\n\n@available(iOS, unavailable)\nclass Outer {\n @available(*, unavailable)\n func completelyBadMethod() {} // expected-note {{'...
dataset_sample\swift\apple_swift\test\attr\attr_availability_transitive_nested.swift
attr_availability_transitive_nested.swift
Swift
844
0.95
0.08
0.142857
python-kit
136
2024-11-03T15:48:49.828802
BSD-3-Clause
true
affbb34661471d49b05920ec75625e86
// RUN: %target-typecheck-verify-swift -parse-as-library\n// REQUIRES: OS=macosx\n\n// Allow referencing unavailable API in situations where the caller is marked unavailable in the same circumstances.\n\nstruct AlwaysAvailable {}\n\n@available(*, unavailable)\nstruct NeverAvailable {} // expected-note * {{'NeverAvailab...
dataset_sample\swift\apple_swift\test\attr\attr_availability_transitive_osx.swift
attr_availability_transitive_osx.swift
Swift
21,463
0.95
0.013356
0.043071
react-lib
967
2024-02-16T08:18:49.729487
MIT
true
56c6e780fabed02e412c79ad95346782
// RUN: %target-typecheck-verify-swift -parse-as-library -application-extension\n// REQUIRES: OS=macosx\n\n// Allow referencing unavailable API in situations where the caller is marked unavailable in the same circumstances.\n\n@available(*, unavailable)\nstruct NeverAvailable {} // expected-note * {{'NeverAvailable' ha...
dataset_sample\swift\apple_swift\test\attr\attr_availability_transitive_osx_appext.swift
attr_availability_transitive_osx_appext.swift
Swift
17,408
0.95
0.042959
0.033426
react-lib
600
2025-05-02T22:52:29.275222
Apache-2.0
true
be72e8c35d37387aec3b960dd8d42425
// RUN: %swift -typecheck -verify -parse-stdlib -target i386-apple-tvos9.0 %s\n\n@available(tvOS, introduced: 1.0, deprecated: 2.0, obsoleted: 9.0,\n message: "you don't want to do that anyway")\nfunc doSomething() { }\n// expected-note @-1{{'doSomething()' was obsoleted in tvOS 9.0}}\n\ndoSomething() // e...
dataset_sample\swift\apple_swift\test\attr\attr_availability_tvos.swift
attr_availability_tvos.swift
Swift
3,523
0.95
0.107527
0.203125
react-lib
644
2023-08-10T03:17:30.176291
GPL-3.0
true
9388eed85e60fb355af505490c929976
// RUN: %target-typecheck-verify-swift\n\n// Test that availability analysis traverses our type representations.\n\n@available(*, deprecated)\nclass D {}\n\nprotocol P<T1> {\n associatedtype T1 = D // expected-warning {{'D' is deprecated}}{{documentation-file=deprecated-declaration}}\n associatedtype T2: P where T2: ...
dataset_sample\swift\apple_swift\test\attr\attr_availability_types.swift
attr_availability_types.swift
Swift
2,547
0.95
0.04878
0.083333
awesome-app
596
2024-08-28T10:26:00.206367
GPL-3.0
true
ff932902114423a5079623f6978a36e6
// RUN: %target-typecheck-verify-swift -parse-as-library\n// REQUIRES: OS=macosx\n@available(macOS 998.0, *)\n@discardableResult\nfunc foo() -> Int { return 0 }\n\n@available(macOS 999.0, *)\n@discardableResult\nfunc bar() -> Int { return 0 }\n\n// Verify that #unavailable is the opposite of #available.\n// expected-no...
dataset_sample\swift\apple_swift\test\attr\attr_availability_unavailable_query.swift
attr_availability_unavailable_query.swift
Swift
2,611
0.95
0.239437
0.25
node-utils
50
2024-10-27T14:30:12.114702
BSD-3-Clause
true
3a3aa5aa830909198194d329d89f5ecf
// RUN: %swift -typecheck -verify -parse-stdlib -target arm64-apple-xros2.0 %s\n\n@available(visionOS, introduced: 1.0, deprecated: 1.5, obsoleted: 2.0,\n message: "you don't want to do that anyway")\npublic func doSomething() { }\n// expected-note @-1{{'doSomething()' was obsoleted in visionOS 2.0}}\n\ndoSom...
dataset_sample\swift\apple_swift\test\attr\attr_availability_vision.swift
attr_availability_vision.swift
Swift
2,937
0.95
0.140845
0.22449
awesome-app
317
2024-12-01T11:00:52.105068
GPL-3.0
true
8b1047e8a678e742a5a3c3b8c875264d
// RUN: %swift -typecheck -verify -parse-stdlib -target i386-apple-watchos2.0 %s\n\n@available(watchOS, introduced: 1.0, deprecated: 1.5, obsoleted: 2.0,\n message: "you don't want to do that anyway")\nfunc doSomething() { }\n// expected-note @-1{{'doSomething()' was obsoleted in watchOS 2.0}}\n\ndoSomethi...
dataset_sample\swift\apple_swift\test\attr\attr_availability_watchos.swift
attr_availability_watchos.swift
Swift
3,625
0.95
0.107527
0.203125
awesome-app
151
2023-11-23T04:54:06.918387
MIT
true
08d45fc8c4189aea1185b1d5ded60962
// RUN: %target-typecheck-verify-swift -parse-as-library \\n// RUN: -define-availability "_myProject 2.0:macOS 12.0"\n\n// REQUIRES: OS=macosx\n\n// MARK: - Valid declarations\n\n// Ok, top level functions\n@backDeployed(before: macOS 12.0)\npublic func backDeployedTopLevelFunc() {}\n\n// Ok, internal decls may be ba...
dataset_sample\swift\apple_swift\test\attr\attr_backDeployed.swift
attr_backDeployed.swift
Swift
16,500
0.95
0.084599
0.081395
python-kit
889
2023-09-25T02:08:25.648854
MIT
true
4e2240d582366252df06093a980e0b08
// RUN: %target-typecheck-verify-swift -parse-as-library\n\n// REQUIRES: OS=macosx\n\n@backDeployed(before: macOS 12) // Ok, introduced availability is inferred to be macOS 10.9\npublic func topLevelFunc() {}\n\npublic struct TopLevelStruct {\n @backDeployed(before: macOS 12) // Ok, introduced availability is inferred...
dataset_sample\swift\apple_swift\test\attr\attr_backDeployed_availability.swift
attr_backDeployed_availability.swift
Swift
4,441
0.8
0.070588
0.029412
vue-tools
196
2024-10-20T05:42:10.767058
Apache-2.0
true
fd229a34efd53805131d04fff276dbf0
// RUN: %target-typecheck-verify-swift -parse-as-library\n// RUN: %target-typecheck-verify-swift -parse-as-library -application-extension\n\n@available(macOS 11, *)\n@available(macOSApplicationExtension, unavailable)\npublic struct UnavailableMacOSExtensionsStruct {\n @backDeployed(before: macOS 12)\n public func mem...
dataset_sample\swift\apple_swift\test\attr\attr_backDeployed_availability_extension.swift
attr_backDeployed_availability_extension.swift
Swift
328
0.8
0
0.25
vue-tools
941
2024-04-01T14:49:36.158397
Apache-2.0
true
6d89b2e9d380a4f6ac11dc3732220e75
// RUN: %target-typecheck-verify-swift -parse-as-library\n\n// REQUIRES: OS=xros\n\n@backDeployed(before: visionOS 2) // Ok, introduced availability is inferred to be visionOS epoch\npublic func topLevelFunc() {}\n\npublic struct TopLevelStruct {\n @backDeployed(before: visionOS 2) // Ok, introduced availability is in...
dataset_sample\swift\apple_swift\test\attr\attr_backDeployed_availability_visionos.swift
attr_backDeployed_availability_visionos.swift
Swift
6,485
0.8
0
0.022472
node-utils
13
2023-07-21T14:07:17.505790
Apache-2.0
true
b8952a9685e39c57e9dff938573918f6
//\n// At a high level, this test is designed to verify that use of declarations\n// annotated with @backDeployed behave as expected when running a client binary\n// on an older OS that does not have the back deployed APIs. The\n// BackDeployHelper framework has a number of APIs that are available in the\n// OSes ident...
dataset_sample\swift\apple_swift\test\attr\attr_backDeployed_evolution.swift
attr_backDeployed_evolution.swift
Swift
8,600
0.95
0.018692
0.675978
awesome-app
790
2024-09-07T09:57:14.384798
BSD-3-Clause
true
27401a217560e0fc31811dd32ae4d6d8
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck -parse-as-library -verify %s\n\n// REQUIRES: OS=macosx\n\nimport Foundation\n\npublic class SwiftClass {\n @backDeployed(before: macOS 12.0) // expected-error {{'@backDeployed' must not be used on an '@objc' instance method}}\n @objc final publi...
dataset_sample\swift\apple_swift\test\attr\attr_backDeployed_objc.swift
attr_backDeployed_objc.swift
Swift
3,703
0.95
0.023256
0.033898
vue-tools
935
2024-03-05T17:42:55.592827
MIT
true
b948f75f72eb20bb3c58bb079dcb008a
// RUN: %target-typecheck-verify-swift -target %target-swift-5.1-abi-triple\n// REQUIRES: objc_interop\n// REQUIRES: concurrency\n\nimport Foundation\n\n@_borrowed // expected-error {{'@_borrowed' attribute cannot be applied to this declaration}}\nfunc foo() -> String {}\n\n@_borrowed\nvar string = ""\n\n@objc protocol...
dataset_sample\swift\apple_swift\test\attr\attr_borrowed.swift
attr_borrowed.swift
Swift
910
0.95
0.2
0.125
vue-tools
506
2024-06-07T23:32:12.225505
Apache-2.0
true
5705fbaa5ddadd1e38ae961dd37f912e
// RUN: %target-typecheck-verify-swift -enable-objc-interop\n\n@_cdecl("cdecl_foo") func foo(x: Int) -> Int { return x }\n\n@_cdecl("") // expected-error{{symbol name cannot be empty}}\nfunc emptyName(x: Int) -> Int { return x }\n\n@_cdecl("noBody")\nfunc noBody(x: Int) -> Int // expected-error{{expected '{' in body of...
dataset_sample\swift\apple_swift\test\attr\attr_cdecl.swift
attr_cdecl.swift
Swift
1,820
0.95
0.067797
0.139535
node-utils
637
2024-08-28T08:52:20.105206
MIT
true
118fd855880590b88ae02c06aa7dafdd
// RUN: %target-typecheck-verify-swift -enable-objc-interop -disable-availability-checking\n\n// REQUIRES: concurrency\n\n@_cdecl("async") // expected-error{{@_cdecl global function cannot be asynchronous}}\nfunc asynchronous() async { }\n\n
dataset_sample\swift\apple_swift\test\attr\attr_cdecl_async.swift
attr_cdecl_async.swift
Swift
235
0.95
0.142857
0.5
python-kit
829
2023-08-13T19:39:57.942829
Apache-2.0
true
74af5b15a67454b3ee60302d17a1befe
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck -verify %s \\n// RUN: -enable-experimental-feature CDecl -disable-objc-interop\n\n// REQUIRES: swift_feature_CDecl\n\n@cdecl("cdecl_foo") func foo(x: Int) -> Int { return x }\n\n@cdecl("") // expected-error{{@cdecl symbol name cannot be empty}}\...
dataset_sample\swift\apple_swift\test\attr\attr_cdecl_official.swift
attr_cdecl_official.swift
Swift
1,908
0.95
0.070175
0.146341
awesome-app
236
2025-01-12T21:15:27.467199
MIT
true
b0417b6e5b567599e04dd71f507620ab
// RUN: %target-typecheck-verify-swift -enable-objc-interop -disable-availability-checking -enable-experimental-feature CDecl\n\n// REQUIRES: concurrency\n// REQUIRES: swift_feature_CDecl\n\n@_cdecl("async") // expected-error{{@_cdecl global function cannot be asynchronous}}\nfunc asynchronous() async { }\n\n@cdecl("as...
dataset_sample\swift\apple_swift\test\attr\attr_cdecl_official_async.swift
attr_cdecl_official_async.swift
Swift
418
0.95
0.181818
0.428571
vue-tools
786
2025-06-20T15:13:56.544572
Apache-2.0
true
21441e0c12c05fa0391429906a8792fd
// RUN: %target-typecheck-verify-swift\n// RUN: %target-swift-frontend -typecheck %s \\n// RUN: -enable-experimental-feature CDecl\n\n// REQUIRES: swift_feature_CDecl\n\n@cdecl("cdecl_foo") func foo() { } // expected-error {{'@cdecl' requires '-enable-experimental-feature CDecl'}}\n\nvar computed: Int {\n @cdecl("ge...
dataset_sample\swift\apple_swift\test\attr\attr_cdecl_official_rejected.swift
attr_cdecl_official_rejected.swift
Swift
530
0.95
0
0.444444
node-utils
988
2024-10-07T03:19:01.466593
MIT
true
0a67ce79255e2fa818c24f32a99adbda
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck -verify %s \\n// RUN: -enable-experimental-feature CDecl\n\n// REQUIRES: swift_feature_CDecl\n// REQUIRES: objc_interop\n\nimport Foundation\n\n@objc\nclass MyClass: NSObject { }\n\n@cdecl("cdecl_c") func objc_ref() -> MyClass { fatalError() }\n...
dataset_sample\swift\apple_swift\test\attr\attr_cdecl_official_with_objc.swift
attr_cdecl_official_with_objc.swift
Swift
751
0.95
0.235294
0.583333
vue-tools
997
2025-03-26T17:55:59.041938
GPL-3.0
true
779c21816aa690fdea13afba3d1b308a
// RUN: %target-typecheck-verify-swift\n\n@propertyWrapper\nstruct Pushin {\n var wrappedValue: String\n\n init(_ thing: String) {\n wrappedValue = thing\n }\n}\n\nprotocol P {\n // expected-error@+1 {{'@_compilerInitialized' is not currently supported in protocols}}\n @_compilerInitialized var bad_requirement:...
dataset_sample\swift\apple_swift\test\attr\attr_compilerInitialized.swift
attr_compilerInitialized.swift
Swift
2,142
0.95
0.071429
0.325
vue-tools
846
2023-07-30T13:23:38.158412
GPL-3.0
true
6bd8efca74bae40263087d71bf37607a
// RUN: %target-swift-frontend -typecheck -verify %s -enable-experimental-flow-sensitive-concurrent-captures\n// REQUIRES: concurrency\n\n// Concurrent attribute on a function type.\n// expected-note@+1{{found this candidate}}\nfunc f(_ fn: @Sendable (Int) -> Int) { }\n\n// Okay to overload @Sendable vs. not concurrent...
dataset_sample\swift\apple_swift\test\attr\attr_concurrent.swift
attr_concurrent.swift
Swift
5,892
0.95
0.050314
0.109375
vue-tools
411
2025-01-19T17:40:37.423352
GPL-3.0
true
fe5a50e4e09e44290b63e464d80f71e7
// RUN: %target-typecheck-verify-swift\n\nlet f1: (Int) -> Int = { $0 }\nlet f2: @convention(swift) (Int) -> Int = { $0 }\nlet f2a: @convention(swift, cType: "int *(int)") (Int32) -> Int32 = { $0 } // expected-error{{convention 'swift' does not support the 'cType' argument label, did you mean '@convention(c, cType: "in...
dataset_sample\swift\apple_swift\test\attr\attr_convention.swift
attr_convention.swift
Swift
2,109
0.95
0.05
0.068966
node-utils
274
2023-07-14T10:07:37.863333
GPL-3.0
true
f6e06564410b09e5ad00c15d740377af
// RUN: %target-typecheck-verify-swift -enable-objc-interop\n\n// ---------------------------------------------------------------------------\n// Mark function's return value as discardable and silence warning\n// ---------------------------------------------------------------------------\n\n@discardableResult\nfunc f1...
dataset_sample\swift\apple_swift\test\attr\attr_discardableResult.swift
attr_discardableResult.swift
Swift
6,499
0.95
0.06
0.037037
vue-tools
745
2024-12-11T19:36:56.697870
MIT
true
28bcb186e5e38b67730369c8574549dd
// RUN: %target-typecheck-verify-swift -enable-objc-interop\n// RUN: %target-swift-ide-test -enable-objc-interop -print-ast-typechecked -source-filename=%s -print-implicit-attrs\n\nstruct NotObjCAble {\n var c: Foo\n}\n\n@objc class ObjCClass {}\n\ndynamic prefix operator +!+ // expected-error{{unexpected attribute '...
dataset_sample\swift\apple_swift\test\attr\attr_dynamic.swift
attr_dynamic.swift
Swift
2,302
0.95
0.080645
0.170732
react-lib
475
2025-05-31T04:44:03.504171
BSD-3-Clause
true
6ff3bc0a92afbc1709bb65113b508af1
// RUN: %target-typecheck-verify-swift\n\n@dynamicCallable\nstruct Callable {\n func dynamicallyCall(withArguments arguments: [Int]) -> Int {\n return arguments.count\n }\n}\n\n@dynamicCallable\nstruct DiscardableResult {\n @discardableResult\n func dynamicallyCall(withArguments arguments: [Double]) -> Int {\n ...
dataset_sample\swift\apple_swift\test\attr\attr_dynamic_callable.swift
attr_dynamic_callable.swift
Swift
16,205
0.95
0.039783
0.135593
vue-tools
472
2024-04-10T22:44:25.235237
BSD-3-Clause
true
ed336b3fe1f368b7d50d53652febb3d1
// RUN: %target-swift-ide-test -print-ast-typechecked -source-filename=%s -print-implicit-attrs -disable-objc-attr-requires-foundation-module | %FileCheck %s\n// REQUIRES: objc_interop\n\n@objc class Super {\n @objc dynamic func baseFoo() {}\n}\n\n// CHECK: extension Super {\nextension Super {\n // CHECK: @objc dyna...
dataset_sample\swift\apple_swift\test\attr\attr_dynamic_infer.swift
attr_dynamic_infer.swift
Swift
1,881
0.95
0.034091
0.4
node-utils
660
2024-08-03T06:37:43.260375
GPL-3.0
true
938f3d6a14731d3241dfa24de100ad89
// RUN: %target-typecheck-verify-swift -enable-experimental-feature KeyPathWithMethodMembers\n// REQUIRES: swift_feature_KeyPathWithMethodMembers\n\nvar global = 42\n\n@dynamicMemberLookup\nstruct Gettable {\n subscript(dynamicMember member: StaticString) -> Int {\n return 42\n }\n}\n\n@dynamicMemberLookup\nstruct...
dataset_sample\swift\apple_swift\test\attr\attr_dynamic_member_lookup.swift
attr_dynamic_member_lookup.swift
Swift
25,767
0.95
0.026696
0.106703
vue-tools
731
2024-07-05T04:14:49.162276
GPL-3.0
true
5bd29e843bb42094d387b7b0c3b9bb76
// RUN: %target-typecheck-verify-swift -swift-version 4\n\n@escaping var fn : () -> Int = { 4 } // expected-error {{attribute can only be applied to types, not declarations}}\nfunc paramDeclEscaping(@escaping fn: (Int) -> Void) {} // expected-error {{attribute can only be applied to types, not declarations}}\n\nfunc w...
dataset_sample\swift\apple_swift\test\attr\attr_escaping.swift
attr_escaping.swift
Swift
11,977
0.95
0.117216
0.105263
react-lib
513
2025-05-11T14:24:15.014610
Apache-2.0
true
e1c803a6374ed403eebc2964e3e5258d
// RUN: %target-typecheck-verify-swift\n\n@_cdecl("cdecl_foo") func foo(x: Int) -> Int { return x }\n\n@_expose(Cxx) func test() {}\n@_expose(Cxx, "renamed") func renamedFunc() {}\n@_expose(Cxx, "") func emptyNameOk() {}\n\n@_expose // expected-error {{expected '(' in '_expose' attribute}}\nfunc exposeWithoutArgs() {}\...
dataset_sample\swift\apple_swift\test\attr\attr_expose.swift
attr_expose.swift
Swift
1,973
0.95
0
0.020833
node-utils
390
2023-08-25T03:02:33.353471
MIT
true
7b1d14331c769e6f5131188e5ba6f57b
// RUN: %target-typecheck-verify-swift\n\n@extensible\npublic enum E1 { // Ok\n}\n\n@extensible // expected-error {{'@extensible' attribute can only be applied to public or package declarations, but 'E2' is fileprivate}}\nfileprivate enum E2 {}\n\n@extensible // expected-error {{cannot use '@extensible' together with '...
dataset_sample\swift\apple_swift\test\attr\attr_extensible.swift
attr_extensible.swift
Swift
1,200
0.8
0
0.033333
vue-tools
1,000
2024-11-15T05:27:49.435325
GPL-3.0
true
082e7767702274c32bf2cb433bcedf40
// RUN: %target-typecheck-verify-swift -enable-experimental-feature Extern -disable-availability-checking\n\n// https://github.com/apple/swift/issues/70776\n// REQUIRES: github70776\n// REQUIRES: swift_feature_Extern\n\n@_extern(wasm, module: "m1", name: "f1")\nfunc f1(x: Int) -> Int\n\n@_extern(wasm, module: "m2", nam...
dataset_sample\swift\apple_swift\test\attr\attr_extern.swift
attr_extern.swift
Swift
6,458
0.95
0.076923
0.052632
react-lib
204
2024-10-10T00:28:34.972662
MIT
true
d971c4fde5de92176d9b8331708e120d
// RUN: %target-typecheck-verify-swift -enable-experimental-feature Extern -emit-fixits-path %t.remap -fixit-all\n// RUN: c-arcmt-test %t.remap | arcmt-test -verify-transformed-files %s.result\n\n// REQUIRES: swift_feature_Extern\n\n@_extern(c) // expected-warning {{C name '+' may be invalid; explicitly specify the nam...
dataset_sample\swift\apple_swift\test\attr\attr_extern_fixit.swift
attr_extern_fixit.swift
Swift
393
0.8
0
0.6
vue-tools
388
2024-05-13T13:30:19.237374
MIT
true
11ec5caaf1e6518e9d83d2f47df79ac2
// RUN: %target-typecheck-verify-swift\n\nclass Super {\n final var i: Int { get { return 5 } } // expected-note{{overridden declaration is here}}\n final func foo() { } // expected-note{{overridden declaration is here}}\n final subscript (i: Int) -> Int { // expected-note{{overridden declaration is here}}\n get ...
dataset_sample\swift\apple_swift\test\attr\attr_final.swift
attr_final.swift
Swift
3,478
0.95
0.238636
0.013889
react-lib
717
2024-09-21T06:58:35.852791
Apache-2.0
true
d381b5b725ffd03897232751fb975325
// RUN: %target-typecheck-verify-swift -swift-version 4\n\nprotocol P {}\n\nextension P {\n final func inExtension() {} // expected-error {{only classes and class members may be marked with 'final'}} {{3-9=}}\n}\n
dataset_sample\swift\apple_swift\test\attr\attr_final_protocol_extension.swift
attr_final_protocol_extension.swift
Swift
207
0.95
0.142857
0.2
node-utils
86
2025-05-17T06:56:16.112491
GPL-3.0
true
d57ef9195c90b27c43b8ff3e79e542b9
// RUN: %target-swift-frontend -typecheck -swift-version 4.2 -verify -dump-ast -enable-library-evolution %s | %FileCheck --check-prefix=RESILIENCE-ON %s\n// RUN: %target-swift-frontend -typecheck -swift-version 4.2 -verify -dump-ast -enable-library-evolution -enable-testing %s | %FileCheck --check-prefix=RESILIENCE-ON ...
dataset_sample\swift\apple_swift\test\attr\attr_fixed_layout.swift
attr_fixed_layout.swift
Swift
9,222
0.95
0.081967
0.378571
node-utils
591
2023-08-02T01:29:14.824133
Apache-2.0
true
16c935cbb74e7822443f19895cdd4e03
// RUN: %target-typecheck-verify-swift -swift-version 5\n\nprivate struct PrivateType {}\n// expected-note@-1 {{struct 'PrivateType' is not '@usableFromInline' or public}}\n// expected-note@-2 {{initializer 'init()' is not '@usableFromInline' or public}}\n// expected-note@-3 {{type declared here}}\n\n@_fixed_layout pub...
dataset_sample\swift\apple_swift\test\attr\attr_fixed_layout_class.swift
attr_fixed_layout_class.swift
Swift
969
0.95
0.055556
0.571429
python-kit
688
2025-06-11T09:23:06.004911
Apache-2.0
true
ee645af606a0656001acc5db27c78d02
// RUN: %target-typecheck-verify-swift -swift-version 5 -package-name myPkg\n\nprivate class PrivateType {} // expected-note {{class 'PrivateType' is not '@usableFromInline' or public}}\n// expected-note@-1 {{initializer 'init()' is not '@usableFromInline' or public}}\n// expected-note@-2 {{type declared here}}\n\npack...
dataset_sample\swift\apple_swift\test\attr\attr_fixed_layout_property_wrapper.swift
attr_fixed_layout_property_wrapper.swift
Swift
2,202
0.95
0.152174
0.388889
vue-tools
178
2024-09-03T16:24:58.052321
BSD-3-Clause
true
cd0155725e64f202ac8ec27320aeaca9
// RUN: %target-swift-frontend -typecheck %s -verify\n\n// This test just makes sure we don't error if we see either of these attributes.\n\n@_hasMissingDesignatedInitializers // no-error\nclass MyClass {}\n\n@_inheritsConvenienceInitializers // no-error\nclass MyOtherClass {}\n
dataset_sample\swift\apple_swift\test\attr\attr_hasMissingDesignatedInits.swift
attr_hasMissingDesignatedInits.swift
Swift
270
0.95
0.333333
0.333333
awesome-app
282
2025-03-28T13:22:26.576908
MIT
true
47be99e6f0cfb75178274de5364bb242
// RUN: %target-typecheck-verify-swift\n\n// REQUIRES: objc_interop\n\n@IBAction // expected-error {{@IBAction may only be used on 'func' declarations}} {{1-11=}}\nvar iboutlet_global: Int\n\nvar iboutlet_accessor: Int {\n @IBAction // expected-error {{@IBAction may only be used on 'func' declarations}} {{3-13=}}\n g...
dataset_sample\swift\apple_swift\test\attr\attr_ibaction.swift
attr_ibaction.swift
Swift
7,697
0.95
0.040541
0.186441
awesome-app
192
2023-09-18T12:19:38.836839
Apache-2.0
true
4746c2b381171625e233259b0ec80700
// RUN: not %target-build-swift -typecheck %s 2>&1 | %FileCheck -check-prefix=CHECK-%target-os %s\n// REQUIRES: objc_interop\n// REQUIRES: executable_test\n\nclass IBActionWrapperTy {\n @IBAction func nullary() {}\n // CHECK-ios-NOT: attr_ibaction_ios.swift:[[@LINE-1]]\n // CHECK-macosx: attr_ibaction_ios.swift:[[@L...
dataset_sample\swift\apple_swift\test\attr\attr_ibaction_ios.swift
attr_ibaction_ios.swift
Swift
1,892
0.95
0.03125
0.821429
vue-tools
991
2025-03-24T06:48:35.730852
MIT
true
193384938d50981cc6c43eb4e45dd417
// RUN: %target-typecheck-verify-swift\n\n// REQUIRES: objc_interop\nimport Foundation\n\n// expected-error@+1 {{'@IBOutlet' property cannot have non-object type 'Int'}}\n@IBOutlet // expected-error {{only class instance properties can be declared @IBOutlet}} {{1-11=}}\nvar iboutlet_global: Int?\n\n@IBOutlet // expecte...
dataset_sample\swift\apple_swift\test\attr\attr_iboutlet.swift
attr_iboutlet.swift
Swift
6,853
0.95
0.107527
0.180556
node-utils
632
2025-05-09T02:55:15.299918
GPL-3.0
true
780a386319029714903b60211c0b7578
// RUN: %target-typecheck-verify-swift\n\n// REQUIRES: objc_interop\n\n@IBSegueAction // expected-error {{@IBSegueAction may only be used on 'func' declarations}} {{1-16=}}\nvar iboutlet_global: Int\n\nvar iboutlet_accessor: Int {\n @IBSegueAction // expected-error {{@IBSegueAction may only be used on 'func' declarati...
dataset_sample\swift\apple_swift\test\attr\attr_ibsegueaction.swift
attr_ibsegueaction.swift
Swift
23,521
0.95
0.029167
0.22043
awesome-app
352
2024-09-01T05:08:52.206289
GPL-3.0
true
25a065b4cc0a6f5839c69b9520809af9
// RUN: %target-run-simple-swift %s\n// REQUIRES: executable_test\n\nprotocol P {\n func f0() -> Int;\n func f1() -> Int\n func f(x:Int, y:Int) -> Int;\n}\n\nprotocol Q {\n func f(x:Int, y:Int) -> Int;\n}\n\nstruct S : P, Q, Equatable {\n\n // Test that it's possible to denote a zero-arg requirement\n // (This in...
dataset_sample\swift\apple_swift\test\attr\attr_implements.swift
attr_implements.swift
Swift
3,080
0.95
0.036697
0.27907
node-utils
654
2024-01-10T15:01:57.563562
BSD-3-Clause
true
dab0a21bc0cef9c7ec45beb153118707
// RUN: %target-swift-frontend -parse -verify %s\n\nstruct S0 {\n @_implements(1, Foo) // expected-error {{expected type}}\n func f() { }\n}\n\nstruct S1 {\n @_implements(NeedsF0, 1) // expected-error {{expected a member name as second parameter in '_implements' attribute}}\n func f() { }\n}\n\nstruct S2 {\n @_imp...
dataset_sample\swift\apple_swift\test\attr\attr_implements_bad_parse.swift
attr_implements_bad_parse.swift
Swift
403
0.8
0
0.076923
python-kit
193
2024-02-26T07:39:53.344550
GPL-3.0
true
7a2f06a91f89d91b0d1bb9ac1ef50484
// RUN: %target-typecheck-verify-swift\n\nprotocol NeedsF0 {\n func f0() // expected-note {{protocol requires function 'f0()' with type '() -> ()'}}\n}\n\nstruct S0 : NeedsF0 { // expected-error {{type 'S0' does not conform to protocol 'NeedsF0'}} expected-note {{add stubs for conformance}}\n @_implements(NeedsF0, f...
dataset_sample\swift\apple_swift\test\attr\attr_implements_bad_types.swift
attr_implements_bad_types.swift
Swift
836
0.95
0.08
0.052632
node-utils
901
2024-09-26T15:11:00.809336
MIT
true
feddb88a0826b0b2ee413bac14317598
// RUN: %empty-directory(%t)\n// RUN: echo 'main()' >%t/main.swift\n// RUN: %target-swiftc_driver -o %t/a.out %s %t/main.swift\n// RUN: %target-codesign %t/a.out\n// RUN: %target-run %t/a.out | %FileCheck %s\n// REQUIRES: executable_test\n\n// This is a more-thorough and explicit test for rdar://43804798 that uses @_im...
dataset_sample\swift\apple_swift\test\attr\attr_implements_fp.swift
attr_implements_fp.swift
Swift
4,489
0.95
0.019608
0.212121
react-lib
517
2024-12-26T16:58:38.386052
MIT
true
8ca9738be12cffd7ee04c12fef44089b
// RUN: %empty-directory(%t)\n// RUN: echo 'client()' >%t/main.swift\n// RUN: %target-build-swift-dylib(%t/%target-library-name(AttrImplFP)) -module-name AttrImplFP -emit-module -emit-module-path %t/AttrImplFP.swiftmodule %S/attr_implements_fp.swift\n// RUN: %target-build-swift -I %t -o %t/a.out %s %t/main.swift -L %t ...
dataset_sample\swift\apple_swift\test\attr\attr_implements_serial.swift
attr_implements_serial.swift
Swift
1,562
0.95
0.028571
0.516129
vue-tools
9
2024-01-04T01:37:14.871330
GPL-3.0
true
9ee8a9de9e26dc7f0e4e4a4a66093d8e
// RUN: %target-typecheck-verify-swift\n\nfunc takeFn(@_implicitSelfCapture fn: @escaping () -> Int) { }\nfunc takeEscapingFn(fn: @escaping () -> Int) { }\n\nclass C {\n var property: Int = 0\n\n func method() { }\n\n func testMethod() {\n takeFn { // no errors\n method()\n return property\n }\n\n ...
dataset_sample\swift\apple_swift\test\attr\attr_implicitselfcapture.swift
attr_implicitselfcapture.swift
Swift
833
0.95
0.041667
0.157895
react-lib
541
2025-06-22T07:45:55.805834
BSD-3-Clause
true
2ab8c3dc3fe06e23f5a57602658c5573
// RUN: %target-typecheck-verify-swift\n\nenum Foo<T> {\n indirect case A // expected-error{{enum case 'A' without associated value cannot be 'indirect'}}\n indirect case B(T)\n indirect case C, D(T) // expected-error{{enum case 'C' without associated value cannot be 'indirect'}}\n}\n\nindirect enum Barbie<T> {\n c...
dataset_sample\swift\apple_swift\test\attr\attr_indirect.swift
attr_indirect.swift
Swift
602
0.8
0
0.0625
python-kit
706
2023-11-30T21:12:32.221193
BSD-3-Clause
true
14002106bac34af1f8fd3b44ec222f3a
// RUN: %target-typecheck-verify-swift -swift-version 5\n// RUN: %target-typecheck-verify-swift -swift-version 5 -enable-testing\n// RUN: %target-typecheck-verify-swift -swift-version 5 -enable-library-evolution\n// RUN: %target-typecheck-verify-swift -swift-version 5 -enable-library-evolution -enable-testing\n@inlinab...
dataset_sample\swift\apple_swift\test\attr\attr_inlinable.swift
attr_inlinable.swift
Swift
12,974
0.95
0.144772
0.267101
react-lib
0
2023-08-30T11:47:26.709329
Apache-2.0
true
7b2e34d719f3bc52a80ebaabba17fa5b
// RUN: %target-typecheck-verify-swift -swift-version 5\n\n// REQUIRES: OS=macosx\n\npublic struct HasVarWithInternalAccessor {\n @available(macOS, unavailable)\n public internal(set) var internalSetterVar: Int {\n get { return 1 }\n set { } // expected-note {{setter for property 'internalSetterVar' is not '@us...
dataset_sample\swift\apple_swift\test\attr\attr_inlinable_accessor_with_unavailable_storage.swift
attr_inlinable_accessor_with_unavailable_storage.swift
Swift
587
0.95
0.1875
0.153846
node-utils
213
2025-06-24T13:38:06.351849
Apache-2.0
true
8e70f952111256bd273357e124410a21
// A module with library evolution enabled has two different "minimum versions".\n// One, the minimum deployment target, is the lowest version that non-ABI\n// declarations and bodies of non-inlinable functions will ever see. The other,\n// the minimum inlining target, is the lowest version that ABI declarations and\n/...
dataset_sample\swift\apple_swift\test\attr\attr_inlinable_available.swift
attr_inlinable_available.swift
Swift
81,419
0.75
0.096288
0.076012
node-utils
292
2024-12-06T21:18:38.448035
Apache-2.0
true
42668043ac8fcd660faa4d63f1c819e7
// RUN: %target-typecheck-verify-swift\n\n@inlineable public func misspelledInlinable() {}\n// expected-error@-1 {{no attribute named '@inlineable'; did you mean '@inlinable'?}}{{2-12=inlinable}}
dataset_sample\swift\apple_swift\test\attr\attr_inlinable_close_match.swift
attr_inlinable_close_match.swift
Swift
192
0.8
0
0.666667
vue-tools
70
2025-02-08T04:39:43.609695
Apache-2.0
true
e7cc78cd561ab5adcfd4aa4552e7238b
// RUN: %target-typecheck-verify-swift -enable-library-evolution\n\npublic class ResilientClass {\n @inlinable deinit {} // expected-error {{deinitializer can only be '@inlinable' if the class is '@_fixed_layout'}}\n}\n\n@_fixed_layout public class FixedLayoutClass {\n @inlinable deinit {}\n}\n
dataset_sample\swift\apple_swift\test\attr\attr_inlinable_deinit.swift
attr_inlinable_deinit.swift
Swift
292
0.95
0.444444
0.142857
vue-tools
181
2023-11-18T22:30:00.035749
GPL-3.0
true
0a71a626825f2bacb37ae0705e328839
// RUN: %target-swift-frontend -typecheck %s -swift-version 5 -enable-objc-interop -disable-objc-attr-requires-foundation-module -verify\n// RUN: %target-swift-frontend -typecheck %s -swift-version 5 -enable-objc-interop -disable-objc-attr-requires-foundation-module -enable-testing -verify\n\n// RUN: %target-swift-fron...
dataset_sample\swift\apple_swift\test\attr\attr_inlinable_dynamic.swift
attr_inlinable_dynamic.swift
Swift
1,035
0.95
0.125
0.307692
python-kit
857
2024-06-11T03:16:30.868273
Apache-2.0
true
214d9a92411379349480093dad61de61
// RUN: %target-typecheck-verify-swift -swift-version 5\n\n// REQUIRES: concurrency\n\n@available(SwiftStdlib 5.1, *)\n@globalActor\nprivate struct PrivateGA { // expected-note 2 {{type declared here}}\n actor Actor {}\n static let shared = Actor()\n}\n\n@available(SwiftStdlib 5.1, *)\n@globalActor\ninternal struct I...
dataset_sample\swift\apple_swift\test\attr\attr_inlinable_global_actor.swift
attr_inlinable_global_actor.swift
Swift
2,078
0.95
0.032258
0.12963
awesome-app
633
2024-08-20T23:44:09.494289
Apache-2.0
true
dcdba579ec1893ad2cd61a8000c7b417
// RUN: %target-typecheck-verify-swift -swift-version 5\n\nprivate typealias PrivateAlias = Int\n// expected-note@-1 {{type alias 'PrivateAlias' is not '@usableFromInline' or public}}\n\ninternal typealias InternalAlias = Int\n// expected-note@-1 {{type alias 'InternalAlias' is not '@usableFromInline' or public}}\n// e...
dataset_sample\swift\apple_swift\test\attr\attr_inlinable_typealias.swift
attr_inlinable_typealias.swift
Swift
1,251
0.95
0.137931
0.3
react-lib
535
2024-02-13T08:18:06.260680
BSD-3-Clause
true
1f486d812dcab820d42c94b2ed57a13c
// RUN: %target-typecheck-verify-swift -swift-version 6\n\ninternal typealias InternalAlias = Int // expected-note 2 {{type alias 'InternalAlias' is not '@usableFromInline' or public}}\n\n@inlinable public func localTypealiases() {\n typealias LocalAlias = InternalAlias // expected-error {{type alias 'InternalAlias' i...
dataset_sample\swift\apple_swift\test\attr\attr_inlinable_typealias_swift6.swift
attr_inlinable_typealias_swift6.swift
Swift
550
0.95
0.25
0.166667
python-kit
547
2025-03-01T23:50:24.117107
GPL-3.0
true
630f886663bb576d31cc6405a42182ba
// RUN: %target-typecheck-verify-swift\n\nfunc f(x : inout Int) { } // okay\n\nfunc h(_ : inout Int) -> (inout Int) -> (inout Int) -> Int { }\n\nfunc ff(x: (inout Int, inout Float)) { } // expected-error 2{{'inout' may only be used on parameters}}\n\nenum inout_carrier {\n case carry(inout Int) // expected-error {{'i...
dataset_sample\swift\apple_swift\test\attr\attr_inout.swift
attr_inout.swift
Swift
523
0.95
0.076923
0.125
awesome-app
561
2024-02-09T18:31:02.928657
Apache-2.0
true
14e21b8ce112a3b0c7cd0e4b8961100b
// RUN: %target-typecheck-verify-swift\n\n// Marker protocol definition\n@_marker protocol P1 {\n func f() // expected-error{{marker protocol 'P1' cannot have any requirements}}\n}\n\n@_marker protocol P2 {\n associatedtype AT // expected-error{{marker protocol 'P2' cannot have any requirements}}\n}\n\n@_marker proto...
dataset_sample\swift\apple_swift\test\attr\attr_marker_protocol.swift
attr_marker_protocol.swift
Swift
2,445
0.95
0.09589
0.150943
python-kit
534
2023-12-15T16:48:19.601306
MIT
true
a205457dba1a0f2e1630c0bcda29f83d
// RUN: %target-swift-frontend -swift-version 5 -typecheck -dump-ast %s | %FileCheck %s\n\nstruct Strukt {\n // CHECK: (struct_decl {{.*}} "Strukt"\n // CHECK: (var_decl {{.*}} "dynamicStorageOnlyVar" interface_type="Int" access=internal dynamic readImpl=stored writeImpl=stored readWriteImpl=stored\n // CHECK: (acc...
dataset_sample\swift\apple_swift\test\attr\attr_native_dynamic.swift
attr_native_dynamic.swift
Swift
13,458
0.95
0.265993
0.410448
react-lib
239
2024-01-16T00:09:50.090981
GPL-3.0
true
fa959800062f7c5171c6ea44758e846b
// RUN: %target-typecheck-verify-swift\n\n@noescape var fn : () -> Int = { 4 } // expected-error {{attribute can only be applied to types, not declarations}}\n\nfunc conflictingAttrs(_ fn: @noescape @escaping () -> Int) {} // expected-error {{unknown attribute 'noescape'}}\n\nfunc doesEscape(_ fn : @escaping () -> Int...
dataset_sample\swift\apple_swift\test\attr\attr_noescape.swift
attr_noescape.swift
Swift
21,442
0.95
0.043353
0.10566
vue-tools
862
2024-03-16T09:42:26.560698
BSD-3-Clause
true
2e0ce5d5bc3979749599e2895e83747e
// RUN: %target-typecheck-verify-swift\n// REQUIRES: objc_interop\n\nimport Foundation\n\n@objc class LightSaber {\n init() {\n caloriesBurned = 5\n }\n\n @objc func defeatEnemy(_ b: Bool) -> Bool { // expected-note {{'defeatEnemy' previously declared here}}\n return !b\n }\n\n // Make sure we can overload a...
dataset_sample\swift\apple_swift\test\attr\attr_nonobjc.swift
attr_nonobjc.swift
Swift
3,987
0.95
0.135593
0.05814
react-lib
43
2025-05-24T02:12:55.375533
MIT
true
3872ea3a8cd2d1679e969a728da5a924
// RUN: %target-swift-frontend -disable-objc-attr-requires-foundation-module -typecheck -verify %s %S/Inputs/attr_objcMembers_other.swift\n// REQUIRES: objc_interop\n\nimport Foundation\n\n@objcMembers\nclass SomeClassWithObjCMembers {\n func foo() { }\n}\n\nextension SomeClassWithObjCMembers {\n var bar: NSObject? {...
dataset_sample\swift\apple_swift\test\attr\attr_objcMembers.swift
attr_objcMembers.swift
Swift
1,468
0.95
0.086957
0.138889
node-utils
94
2025-01-09T14:36:02.671704
BSD-3-Clause
true
faeee13d95b59b0e80fd18d017c8f879
// RUN: %target-typecheck-verify-swift\n// REQUIRES: objc_interop\n\nimport Foundation\n\n@objc var foo: Any // expected-error {{'@objc' can only be used with members of classes, '@objc' protocols, and concrete extensions of classes}}\n\nclass Foo: NSObject {\n override init() {}\n\n @objc var property: Any\n\n @obj...
dataset_sample\swift\apple_swift\test\attr\attr_objc_any.swift
attr_objc_any.swift
Swift
843
0.95
0.047619
0.230769
node-utils
539
2024-07-19T02:27:51.045875
MIT
true
1aeec7c6df7a8b65ea21919f6e0c32a2
// RUN: %target-swift-frontend -disable-objc-attr-requires-foundation-module -typecheck -verify -verify-ignore-unknown %s -swift-version 5 -enable-source-import -I %S/Inputs -disable-availability-checking -strict-concurrency=complete\n// RUN: %target-swift-ide-test -skip-deinit=false -print-ast-typechecked -source-fil...
dataset_sample\swift\apple_swift\test\attr\attr_objc_async.swift
attr_objc_async.swift
Swift
4,001
0.95
0.163934
0.625
react-lib
485
2025-01-30T18:26:29.489463
Apache-2.0
true
fdd4c685e8136f8590631b37f652721b
// RUN: %target-typecheck-verify-swift -sdk %S/Inputs -I %S/Inputs/custom-modules -I %S/../Inputs/custom-modules\n// RUN: %target-swift-ide-test -print-ast-typechecked -source-filename %s -sdk %S/Inputs -I %S/Inputs/custom-modules -I %S/../Inputs/custom-modules -function-definitions=true -prefer-type-repr=false -print-...
dataset_sample\swift\apple_swift\test\attr\attr_objc_clang.swift
attr_objc_clang.swift
Swift
1,259
0.95
0.116279
0.212121
node-utils
766
2025-04-26T19:08:10.029110
MIT
true
2447dcac0e3063c350be7ab32367c764
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck -verify %s\n// RUN: %target-swift-ide-test(mock-sdk: %clang-importer-sdk) -print-ast-typechecked -source-filename %s -function-definitions=true -prefer-type-repr=false -print-implicit-attrs=true -explode-pattern-binding-decls=true | %FileCheck %s\...
dataset_sample\swift\apple_swift\test\attr\attr_objc_foreign.swift
attr_objc_foreign.swift
Swift
1,736
0.95
0.09375
0.36
python-kit
300
2024-07-01T06:55:22.117615
BSD-3-Clause
true
d0343d15807395e8d335d97ff13f6009
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck %s -verify\n\n// REQUIRES: objc_interop\n\nimport Foundation\n\nstruct NativeStruct {}\n\nclass Test {\n @objc func invalid() -> NativeStruct { return NativeStruct() }\n // expected-error@-1 {{method cannot be marked '@objc' because its result t...
dataset_sample\swift\apple_swift\test\attr\attr_objc_overlays.swift
attr_objc_overlays.swift
Swift
695
0.95
0.055556
0.307692
node-utils
978
2024-12-17T15:46:28.980752
Apache-2.0
true
380f1fb210e29941d5928303cd45fb99
// RUN: %target-typecheck-verify-swift -swift-version 4\n//\n// REQUIRES: objc_interop\n\nclass MixedKeywordsAndAttributes { // expected-note{{in declaration of 'MixedKeywordsAndAttributes'}}\n // expected-error@+1 {{expected declaration}} expected-error@+1 {{consecutive declarations on a line must be separated by ';'...
dataset_sample\swift\apple_swift\test\attr\attr_objc_override.swift
attr_objc_override.swift
Swift
1,562
0.95
0.102564
0.166667
vue-tools
803
2025-03-12T08:45:59.984689
Apache-2.0
true
888187cc658a7dd1e8a0d5edcaa4b459
// RUN: %empty-directory(%t)\n// RUN: %target-swift-frontend -target %target-pre-stable-abi-triple -emit-module-path %t/resilient_struct.swiftmodule %S/../Inputs/resilient_struct.swift -enable-library-evolution\n// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -target %target-pre-stable-abi-triple -emit-mo...
dataset_sample\swift\apple_swift\test\attr\attr_objc_resilience.swift
attr_objc_resilience.swift
Swift
2,924
0.95
0.107692
0.32
vue-tools
129
2023-10-08T09:49:39.556605
MIT
true
32f94ce880ff0b89a883452cc1d3b876
// RUN: %empty-directory(%t)\n// RUN: %target-swift-frontend -emit-module-path %t/resilient_struct.swiftmodule %S/../Inputs/resilient_struct.swift -enable-library-evolution\n// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -emit-module-path %t/resilient_objc_class.swiftmodule %S/../Inputs/resilient_objc_cl...
dataset_sample\swift\apple_swift\test\attr\attr_objc_resilient_stubs.swift
attr_objc_resilient_stubs.swift
Swift
1,543
0.95
0.119048
0.333333
awesome-app
126
2024-04-07T00:39:54.685359
BSD-3-Clause
true
72bb45c410752afec4ed13709503a974
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck -verify %s\n\n// REQUIRES: objc_interop\n\nimport Foundation\nimport simd\n\n@objc class Foo: NSObject {\n @objc func doStuffWithFloat4(x: float4) -> float4 { return x }\n @objc func doStuffWithDouble2(x: double2) -> double2 { return x }\n @obj...
dataset_sample\swift\apple_swift\test\attr\attr_objc_simd.swift
attr_objc_simd.swift
Swift
428
0.95
0.071429
0.2
python-kit
237
2024-09-19T02:07:35.870527
MIT
true
69e4a7151de31a9df20399e0df818735
// RUN: %target-swift-frontend -disable-objc-attr-requires-foundation-module -typecheck -verify %s -swift-version 4 -enable-source-import -I %S/Inputs\n// RUN: %target-swift-ide-test -skip-deinit=false -print-ast-typechecked -source-filename %s -prefer-type-repr=false -print-implicit-attrs=true -explode-pattern-binding...
dataset_sample\swift\apple_swift\test\attr\attr_objc_swift4.swift
attr_objc_swift4.swift
Swift
2,927
0.95
0.126761
0.345455
react-lib
831
2024-06-12T00:45:20.952527
BSD-3-Clause
true
0ab3bc72fcc4587ed545bca1a317f180
// RUN: %empty-directory(%t)\n// RUN: %target-swift-frontend -c -enable-objc-interop -parse-as-library %s -o /dev/null -disable-objc-attr-requires-foundation-module -module-name typealias_objc -emit-module -emit-module-path %t/typealias_objc.swiftmodule\n// RUN: %target-swift-ide-test -skip-deinit=false -print-ast-type...
dataset_sample\swift\apple_swift\test\attr\attr_objc_typealias_inside_protocol.swift
attr_objc_typealias_inside_protocol.swift
Swift
613
0.95
0.166667
0.571429
awesome-app
792
2025-04-12T01:57:58.299863
GPL-3.0
true
db9a8c19ae255bb5dc6e1ffbb30bbc97
// REQUIRES: executable_test\n// REQUIRES: OS=macosx || OS=ios\n// UNSUPPORTED: DARWIN_SIMULATOR=ios\n// rdar://problem/65399527\n// UNSUPPORTED: OS=ios\n//\n// RUN: %empty-directory(%t)\n//\n// -----------------------------------------------------------------------------\n// --- Prepare SDK (.swiftmodule).\n// RUN: %e...
dataset_sample\swift\apple_swift\test\attr\attr_originally_definedin_backward_compatibility.swift
attr_originally_definedin_backward_compatibility.swift
Swift
3,743
0.95
0.011236
0.805556
vue-tools
29
2024-05-10T03:45:23.750559
MIT
true
7218a306a4a9706654eb91ccc8d996e5
// RUN: %target-typecheck-verify-swift -swift-version 5\n\n@override // expected-error {{'override' can only be specified on class members}} {{1-11=}} expected-error {{'override' is a declaration modifier, not an attribute}} {{1-2=}}\nfunc virtualAttributeCanNotBeUsedInSource() {}\n\nclass MixedKeywordsAndAttributes { ...
dataset_sample\swift\apple_swift\test\attr\attr_override.swift
attr_override.swift
Swift
24,944
0.95
0.145833
0.103806
awesome-app
38
2024-04-04T21:36:35.215065
BSD-3-Clause
true
73abdc6a3d60199dc97265a2d02f08d3
// RUN: %target-typecheck-verify-swift\n\n// -------------------------------------------------------------------------\n// Restrictions on where required can appear\n// -------------------------------------------------------------------------\nrequired class AC { } // expected-error{{'required' may only be used on 'ini...
dataset_sample\swift\apple_swift\test\attr\attr_required.swift
attr_required.swift
Swift
3,484
0.95
0.221154
0.166667
react-lib
218
2025-04-28T00:29:13.397439
GPL-3.0
true
5a70c877a34a57ce68e5e747ba5bd45e
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck %s -verify\n\n// REQUIRES: objc_interop\n\nimport ObjectiveC\n\n// Attribute requires that all stored properties have in-class\n// initializers.\n@requires_stored_property_inits\nclass RequiresOkay { // expected-note{{superclass 'RequiresOkay' req...
dataset_sample\swift\apple_swift\test\attr\attr_requires_stored_property_inits.swift
attr_requires_stored_property_inits.swift
Swift
2,316
0.95
0.220339
0.173913
awesome-app
441
2025-04-04T10:48:30.132278
MIT
true
8f4794f50fbc57cf7814ad5743983eab
// RUN: %target-typecheck-verify-swift\n\n@_functionBuilder // expected-warning{{'@_functionBuilder' has been renamed to '@resultBuilder'}}{{2-18=resultBuilder}}\nstruct MyBuilder {\n static func buildBlock(_: Any...) -> Any { }\n}\n\n// rdar://104384604 - empty result builder in swiftinterface file\n@resultBuilder\np...
dataset_sample\swift\apple_swift\test\attr\attr_result_builder.swift
attr_result_builder.swift
Swift
3,343
0.95
0
0.079365
vue-tools
861
2024-03-28T06:29:51.678940
Apache-2.0
true
7fa3ae5546d6073ef46fe611e0172bc0
// RUN: %target-typecheck-verify-swift\n\n@rethrows\nprotocol RethrowingProtocol {\n func source() throws\n}\n\nstruct Rethrows<Source: RethrowingProtocol>: RethrowingProtocol {\n var other: Source\n func source() rethrows { }\n}\n\nstruct Throws: RethrowingProtocol {\n func source() throws { }\n}\n\nstruct ThrowsW...
dataset_sample\swift\apple_swift\test\attr\attr_rethrows_protocol.swift
attr_rethrows_protocol.swift
Swift
6,393
0.95
0.144033
0.141304
react-lib
422
2025-02-06T09:21:34.354212
Apache-2.0
true
0ddb0c74710083376bd601bd4bfc951e
// RUN: %target-typecheck-verify-swift\n\n@_semantics("foo")\n@_semantics("bar")\nfunc duplicatesemantics() {}\n\nfunc func_with_nested_semantics_1() {\n @_semantics("exit") \n func exit(_ code : UInt32) -> Void\n exit(0)\n}\n\n// Test parser recovery by having something that\n// should parse fine.\nfunc somethin...
dataset_sample\swift\apple_swift\test\attr\attr_semantics.swift
attr_semantics.swift
Swift
1,378
0.95
0.030769
0.058824
node-utils
15
2024-10-18T19:11:41.738101
GPL-3.0
true
b8845d6fe6ede20bae0ac50bce1154fe
// RUN: %target-typecheck-verify-swift -enable-experimental-feature Extern -verify-additional-prefix runtime-symbols-\n// RUN: %target-typecheck-verify-swift -enable-experimental-feature Extern -enable-experimental-feature AllowRuntimeSymbolDeclarations\n\n// REQUIRES: swift_feature_Extern\n// REQUIRES: swift_feature_A...
dataset_sample\swift\apple_swift\test\attr\attr_silgen_name.swift
attr_silgen_name.swift
Swift
1,353
0.8
0
0.32
python-kit
125
2023-10-12T18:26:55.593740
Apache-2.0
true
2f92d04fc0898ee7d1eabbf681a4197d
// RUN: %target-typecheck-verify-swift\n// RUN: %target-swift-ide-test -print-ast-typechecked -source-filename=%s -disable-objc-attr-requires-foundation-module -define-availability 'SwiftStdlib 5.1:macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0' | %FileCheck %s\n\nstruct S<T> {}\n\npublic protocol P {\n}\nextension Int:...
dataset_sample\swift\apple_swift\test\attr\attr_specialize.swift
attr_specialize.swift
Swift
17,603
0.95
0.107042
0.182759
awesome-app
628
2024-03-18T20:15:37.366650
Apache-2.0
true
1d3c37b42ee5d9dcb08bcfb117050728
// RUN: %target-typecheck-verify-swift -enable-experimental-feature StaticExclusiveOnly\n\n// REQUIRES: swift_feature_StaticExclusiveOnly\n\n@_staticExclusiveOnly // expected-error {{'@_staticExclusiveOnly' can only be applied to noncopyable types}}\nstruct A {}\n\n@_staticExclusiveOnly // OK\nstruct B: ~Copyable { // ...
dataset_sample\swift\apple_swift\test\attr\attr_static_exclusive_only.swift
attr_static_exclusive_only.swift
Swift
3,338
0.95
0.029126
0.135135
python-kit
345
2024-04-13T06:16:59.317137
Apache-2.0
true
f2a8bb3c0126440e5d3818da8f4f0cb0
// RUN: %target-swift-frontend -typecheck %s -parse-stdlib -print-ast | %FileCheck %s --check-prefix=CHECK-NON-EMBEDDED\n// RUN: %target-swift-frontend -typecheck %s -parse-stdlib -enable-experimental-feature Embedded -print-ast | %FileCheck %s --check-prefix=CHECK-EMBEDDED\n\n// REQUIRES: swift_feature_Embedded\n\n// ...
dataset_sample\swift\apple_swift\test\attr\attr_unavailable_in_embedded.swift
attr_unavailable_in_embedded.swift
Swift
642
0.8
0
0.818182
node-utils
7
2024-09-11T10:04:08.069519
Apache-2.0
true
e0bc01b6308d11cd92c5b9312a3305b1
// RUN: %target-typecheck-verify-swift -swift-version 5 -disable-objc-attr-requires-foundation-module -enable-objc-interop -package-name myPkg\n// RUN: %target-typecheck-verify-swift -swift-version 5 -disable-objc-attr-requires-foundation-module -enable-objc-interop -enable-testing -package-name myPkg\n\n@usableFromInl...
dataset_sample\swift\apple_swift\test\attr\attr_usableFromInline.swift
attr_usableFromInline.swift
Swift
16,101
0.95
0.076271
0.243728
python-kit
527
2025-01-12T23:13:22.920931
BSD-3-Clause
true
e66e0df1439b3dd6caf61851d5f44646
// RUN: %target-typecheck-verify-swift -swift-version 5\n// RUN: %target-swift-frontend -typecheck -disable-access-control %s\n\npublic protocol PublicProtoWithReqs {\n associatedtype Assoc\n func foo()\n}\n\n@usableFromInline struct UFIAdopter<T> : PublicProtoWithReqs {}\n// expected-error@-1 {{type alias 'Assoc' mu...
dataset_sample\swift\apple_swift\test\attr\attr_usableFromInline_protocol.swift
attr_usableFromInline_protocol.swift
Swift
2,003
0.95
0
0.3
vue-tools
230
2023-12-30T17:26:31.560912
MIT
true
ff9d798fa8040699108d74ff9ea53550
// RUN: %empty-directory(%t)\n// RUN: %target-swift-frontend -emit-module -o %t/Lib.swiftmodule %S/Inputs/attr_usableFromInline_protocol_hole_helper.swift\n// RUN: %target-typecheck-verify-swift -I %t -verify-ignore-unknown\n\nimport Lib\n\nfunc test(_ obj: PublicProtocol) {\n obj.publicExtensionMethod()\n obj.ufiExt...
dataset_sample\swift\apple_swift\test\attr\attr_usableFromInline_protocol_hole.swift
attr_usableFromInline_protocol_hole.swift
Swift
854
0.95
0
0.157895
python-kit
584
2024-06-08T08:54:19.713513
BSD-3-Clause
true
334f9160de653eb483da27fe9e2114e7