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: not %target-swift-frontend %s -typecheck\n\nstruct S : Sequence {\n struct Iterator : IteratorProtocol {\n mutating func next() -> Int? {\n fatalError()\n }\n }\n\n func makeIterator() -> Iterator {\n fatalError()\n }\n}\n\nextension S : Collection {\n typealias Index = Int\n\n var startInde...
dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\0136-rdar35082483.swift
0136-rdar35082483.swift
Swift
358
0.8
0
0.0625
vue-tools
354
2024-06-12T19:36:31.915260
GPL-3.0
true
f89dccec86bb77e256e22675647c694d
// RUN: not %target-swift-frontend %s -typecheck\n\n// https://github.com/apple/swift/issues/49279\n\npublic protocol OptionalProtocol {\n associatedtype Wrapped\n\n var optional: Wrapped? { get }\n}\n\nextension Optional: OptionalProtocol {\n public var optional: Wrapped? {\n return self\n }\n}\n\npublic extens...
dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\0137-issue-49279.swift
0137-issue-49279.swift
Swift
729
0.95
0.113636
0.058824
awesome-app
764
2024-07-21T05:56:27.846189
MIT
true
746f175e051c50ddefaee003a5265d1d
// RUN: not %target-swift-frontend %s -typecheck\n\nprotocol A {\n var question: String { get }\n\n struct B {\n var answer: Int = 42\n\n func foo(a: A) {\n _ = a.question\n }\n }\n}\n\nclass C : A {\n var question: String = "ultimate question"\n\n func foo() -> B {}\n func bar() -> A.B {}\n func b...
dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\0138-rdar36449760.swift
0138-rdar36449760.swift
Swift
533
0.95
0.073171
0.03125
node-utils
896
2024-09-13T16:33:05.865891
BSD-3-Clause
true
bbab363a1424f20b4c05589ef24325bd
// RUN: %target-swift-frontend %s -emit-ir -o 0\n\nextension Slice where Base == UnsafeBufferPointer<UInt16> {\n var rebased: UnsafeBufferPointer<UInt16> {\n return UnsafeBufferPointer(rebasing: self)\n }\n}\n\nextension Slice where Base == UnsafeMutableBufferPointer<UInt16> {\n var rebased: UnsafeMutableBufferPo...
dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\0138-rdar36453271.swift
0138-rdar36453271.swift
Swift
387
0.8
0
0.090909
awesome-app
810
2024-07-26T17:14:49.930934
BSD-3-Clause
true
54c9e0f1669dfd0567aea6ab29885fd5
// RUN: not %target-swift-frontend -typecheck %s\n\nstruct S {\n // presence of a static instance seems to be\n // necessary to cause this problem\n static let s = S()\n}\n\nprotocol P {\n associatedtype T\n init(t: T)\n}\n\nextension S: P {\n// Uncomment to stop assertion:\n// init(t: Int) {\n// self = S()\n/...
dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\0139-rdar36278079.swift
0139-rdar36278079.swift
Swift
310
0.8
0
0.4375
awesome-app
248
2023-12-26T21:24:43.052960
GPL-3.0
true
c0239f3c6c95b489b46137395e59ee65
// RUN: not %target-swift-frontend %s -typecheck\n\n// https://github.com/apple/swift/issues/49295\n\nstruct Foo: Strideable {\n // typealias Stride = Int\n let x: Int\n\n func distance(to other: Foo) -> Foo.Stride { return abs(other.x - x) }\n func advanced(by n: Foo.Stride) -> Foo { return Foo(x: x + n) }...
dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\0140-issue-49295.swift
0140-issue-49295.swift
Swift
314
0.8
0
0.375
react-lib
398
2024-09-17T15:50:08.224495
MIT
true
220bc3c5531378793458d7715fb19a8b
// RUN: not %target-swift-frontend %s -typecheck\n\nenum E : Equatable {\n case c(Int)\n case c(String)\n}\n
dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\0141-rdar36989792.swift
0141-rdar36989792.swift
Swift
108
0.8
0
0.2
react-lib
6
2023-10-30T02:25:12.678837
GPL-3.0
true
85a702c6e27891076c04d06ae037ae37
// RUN: %target-swift-frontend %s -emit-ir -o /dev/null\nprotocol S {\n associatedtype I: IteratorProtocol\n typealias E = I.Element\n}\n\nfunc foo<T: S>(_ s: T) -> Int where T.E == Int {\n return 42\n}\n
dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\0142-rdar36549499.swift
0142-rdar36549499.swift
Swift
198
0.8
0
0.125
vue-tools
720
2023-07-15T02:39:10.795763
Apache-2.0
true
e3ac6ae47ca312583321c08f8051954a
// RUN: %target-swift-frontend %s -typecheck\n\nstruct S {\n let foo = "bar"\n}\nlet s: S? = S()\nlet str: String? = "hello world"\n\nswitch str {\n case s?.foo?: ()\n default: ()\n}\n
dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\0143-rdar35870863.swift
0143-rdar35870863.swift
Swift
175
0.8
0.083333
0.1
node-utils
215
2023-11-06T08:06:03.149774
BSD-3-Clause
true
5f7ba81d5120e523d1f98ac3307187b6
// RUN: %target-swift-frontend %s -emit-sil -o - | %FileCheck %s\n\n// https://github.com/apple/swift/issues/49620\n\npublic final class GenClass<Element: Cl> {\n public subscript(index: Int) -> Element {\n get { return unsafeBitCast(0, to: Element.self) }\n }\n}\n\npublic protocol Proto { }\n\npublic stru...
dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\0144-issue-49620.swift
0144-issue-49620.swift
Swift
889
0.95
0.090909
0.16
awesome-app
670
2024-10-22T12:13:12.239682
Apache-2.0
true
0bc67f725ec85a7adff034155e5c70d6
// RUN: %target-typecheck-verify-swift\n// RUN: %target-swift-frontend -typecheck -debug-generic-signatures %s 2>&1 | %FileCheck %s\n// RUN: %target-swift-frontend -primary-file %s -emit-ir -o -\n\n// https://github.com/apple/swift/issues/49645\n\nprotocol P1 { }\n\nprotocol P2 {\n associatedtype Assoc // expected-not...
dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\0145-issue-49645.swift
0145-issue-49645.swift
Swift
982
0.8
0
0.375
awesome-app
833
2025-06-07T12:26:24.519748
GPL-3.0
true
c3dd2f301f5ce9319361b7e83d5131c6
// RUN: %target-typecheck-verify-swift\n\nfunc foo(_ msg: Int) {} // expected-note {{candidate expects value of type 'Int' for parameter #1}}\nfunc foo(_ msg: Double) {} // expected-note {{candidate expects value of type 'Double' for parameter #1}}\n\nfunc rdar38309176(_ errors: inout [String]) {\n foo("error: \(er...
dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\0146-rdar38309176.swift
0146-rdar38309176.swift
Swift
399
0.95
0.375
0.166667
react-lib
208
2023-08-18T04:49:49.689869
BSD-3-Clause
true
88106efb2110980880cb2cc22a17e4c4
// RUN: not %target-typecheck-verify-swift\n\nprotocol P1 {\n class N1 {\n init() {}\n }\n}\n\nprotocol P2 {}\n\nextension P2 {\n class N2 {\n init() {}\n }\n}\n\nclass C1: P1.N1 {\n override init() {}\n}\n\nclass C2: P2.N2 {\n override init() {}\n}\n
dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\0147-rdar38505436.swift
0147-rdar38505436.swift
Swift
240
0.95
0.173913
0.055556
node-utils
716
2025-05-03T00:31:38.065651
BSD-3-Clause
true
8832c6dfab53106dd2c9cb83e94b64cb
// RUN: %target-typecheck-verify-swift\n\nlet b: () -> Void = withoutActuallyEscaping({ print("hello crash") }, do: { $0() })\n// expected-error@-1 {{cannot convert value of type '()' to closure result type '() -> Void'}}\n
dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\0148-rdar35773761.swift
0148-rdar35773761.swift
Swift
219
0.8
0
0.666667
awesome-app
902
2025-05-14T19:34:07.279751
BSD-3-Clause
true
8c1b0a399004974aadd457e18753229c
// RUN: %target-swift-frontend -primary-file %s -emit-ir -o -\n\n// https://github.com/apple/swift/issues/49830\n\nstruct S<T> {}\n\nextension S where T == Int {\n typealias Callback = (Bool) -> Void\n\n func process(callback: Callback) { \n }\n}\n
dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\0149-issue-49830.swift
0149-issue-49830.swift
Swift
247
0.8
0
0.25
vue-tools
769
2023-09-23T17:59:54.138757
Apache-2.0
true
e09de88a9d87f700ef96a3bd3da14748
// RUN: %target-typecheck-verify-swift\n\nfunc foo(optional: Int?) {\n _ = { [value = optional ?? 0]\n in\n _ = value\n }\n\n _ = [1].map { [number = optional ?? 1] value -> String in\n return number.description\n }\n}\n
dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\0149-rdar34852808.swift
0149-rdar34852808.swift
Swift
221
0.8
0
0.1
node-utils
1,000
2024-06-07T04:50:47.695356
MIT
true
179a8c669328ad5c1e8a8e9e73af546f
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck %s -verify\n// REQUIRES: objc_interop\n\nimport Foundation\n\n@objc class Foo: NSObject {\n let x: Int = 0\n}\n@objc protocol Bar {\n @objc optional var foo: Foo {get}\n}\n\nfunc baz(bar: Bar) {\n max(bar, bar.foo?.x ?? 0)\n // expected-error@...
dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\0150-rdar39055736.swift
0150-rdar39055736.swift
Swift
386
0.95
0.0625
0.230769
awesome-app
119
2025-02-08T09:05:11.793679
BSD-3-Clause
true
8734e6b0263ef127fde09b9e0fff6371
// RUN: %target-typecheck-verify-swift\n\nclass A {\n func foo() {\n class B {\n let question: String = "ultimate question"\n let answer: Int? = 42\n\n lazy var bar: () -> String = { [weak self] in\n guard let self = self else {\n return "Unknown"\n }\n\n if let answer =...
dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\0151-rdar-39040593.swift
0151-rdar-39040593.swift
Swift
457
0.95
0.136364
0.052632
react-lib
130
2023-09-23T22:58:39.331205
GPL-3.0
true
0bb3eefdcfa3457bad847fa1324c36a2
// RUN: %target-typecheck-verify-swift\n\n// https://github.com/apple/swift/issues/49940\n\nprotocol _UnicodeParser_ {\n associatedtype Encoding: _UnicodeEncoding_\n}\nprotocol _UnicodeEncoding_ {\n associatedtype CodeUnit : BinaryInteger_\n associatedtype ForwardParser : _UnicodeParser_\n where ForwardPa...
dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\0152-issue-49940.swift
0152-issue-49940.swift
Swift
542
0.8
0
0.111111
awesome-app
729
2025-02-10T06:08:04.684494
GPL-3.0
true
d234e6dc67d7c0d8832f97b1d2f11c5f
// RUN: %target-typecheck-verify-swift\n\nstruct S {}\n\nprotocol P {\n typealias A<T> = A_<T, Self>\n}\n\nstruct A_<T, P> {}\n\nextension S {\n subscript<T : P, U>(_: T, _: KeyPath<T, T.A<U>>) -> U {\n fatalError()\n }\n}\n
dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\0152-rdar39253925.swift
0152-rdar39253925.swift
Swift
215
0.8
0
0.090909
awesome-app
534
2025-04-05T16:47:13.836274
Apache-2.0
true
3cb6b8e59515c83f78ba4a4e4656f44c
// RUN: %target-build-swift -emit-module -o %t %s\n\npublic protocol P1 {}\npublic protocol P2 {}\n\npublic protocol P3 {\n static func a()\n\n func b()\n func b<I: P1>(_: (I) -> Void)\n\n static func c<I: P1>(_: I)\n static func d()\n static func d<I: P1>(_: ([(I, I)]) -> Void)\n static func d<I: P1>(_: ([I: I]...
dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\0153-rdar36497404.swift
0153-rdar36497404.swift
Swift
910
0.8
0
0.032258
node-utils
403
2024-09-23T01:49:16.908358
MIT
true
d061adac4d6ea6dd9afb535516ca872f
// RUN: %target-swift-frontend %s -emit-ir\n\n\nprotocol P20 { }\n\nprotocol P21b {\n associatedtype T\n\n func foo(_: (T?) -> Void)\n}\n\nprotocol P21a {\n associatedtype T\n\n func bar(_: ([T]) -> Void)\n}\n\nextension P21b where Self: P21a, T: P20 {\n func foo(_: (T?) -> Void) {\n bar { _ in }\n }\n}\n
dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\0153-rdar39130543.swift
0153-rdar39130543.swift
Swift
285
0.8
0
0.066667
vue-tools
223
2024-03-06T12:12:57.907714
Apache-2.0
true
92ebd7e63b9ebcffb33d5f8669373625
// RUN: %target-swift-frontend %s -emit-ir\n\n// https://github.com/apple/swift/issues/50000\n\nprotocol Proto { }\n\nclass Class {\n func foo<A>(callback: (A) -> Void) where A: Proto {\n }\n\n func foo<A, B>(callback: (A, B) -> Void) where A: Proto, B: Proto {\n }\n}\n\nclass Child: Class {\n override f...
dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\0154-issue-50000.swift
0154-issue-50000.swift
Swift
366
0.95
0.105263
0.153846
node-utils
232
2025-03-02T22:16:31.584541
BSD-3-Clause
true
3a34d0649764b9be88e031c190673073
// RUN: %target-swift-frontend %s -emit-ir\n\n// https://github.com/apple/swift/issues/49912\n\npublic protocol E {\n associatedtype F\n \n static func g(_: F) -> Self\n}\n\ninternal enum CF {\n case f\n}\n\ninternal enum CE: E {\n case f(CF)\n \n static func g(_ f: CF) -> CE {\n return CE.f(f)\n }\n \n static let cf ...
dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\0155-issue-49912.swift
0155-issue-49912.swift
Swift
312
0.8
0
0.125
react-lib
240
2024-07-08T07:46:54.073112
GPL-3.0
true
6b9372d176d31bd119e9d4d3b48f0510
// RUN: %target-swift-frontend %s -emit-module\n\nprotocol P2 {\n func f1<T : P1>(_: T) -> T.T1\n}\n\npublic struct S1<U> {}\n\nprotocol P1 {\n typealias T1 = S1<Self>\n}\n
dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\0156-rdar39636312.swift
0156-rdar39636312.swift
Swift
167
0.8
0
0.125
python-kit
689
2024-10-31T03:50:06.204895
GPL-3.0
true
5cfb6271fffa54a6b7926efb26983950
// RUN: %empty-directory(%t)\n// RUN: not %target-swift-frontend -c %s -index-store-path %t\n\nstruct X : Z {\n func b(_ : Y) {}\n}\n\nprotocol Z {\n associatedtype a\n typealias Y = a.c\n}\n
dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\0157-rdar37730691.swift
0157-rdar37730691.swift
Swift
189
0.8
0
0.222222
react-lib
455
2023-12-29T18:48:23.915509
BSD-3-Clause
true
0d0667061b547375edaaef4e8a58457e
// RUN: %target-typecheck-verify-swift\n\nstruct Foo<T, U> { // expected-note {{incorrect labels for candidate (have: '(_:)', expected: '(value:)')}}\n var value: U\n func bar() -> Foo<T, U> {\n return Foo(value)\n // expected-error@-1 {{no exact matches in call to initializer}}\n }\n}\n\nextension Foo where T...
dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\0158-rdar40165062.swift
0158-rdar40165062.swift
Swift
488
0.95
0.066667
0.153846
vue-tools
941
2023-12-30T08:48:05.029018
Apache-2.0
true
c361209e86f38e3007c9e3fdb07bf34a
// RUN: %target-typecheck-verify-swift\n\nprotocol P0 {\n associatedtype A\n}\n\nprotocol P1 {\n associatedtype B : P3 = S0<S2>\n associatedtype C = ()\n}\n\nprotocol P2 {\n associatedtype D : P1\n associatedtype E : P3 = S0<S2>\n}\n\nprotocol P3 : P0 where A : P2 {}\n\nstruct S0<T> : P0 {\n typealias A = T\n...
dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\0159-rdar39931339.swift
0159-rdar39931339.swift
Swift
504
0.8
0
0.033333
react-lib
718
2023-12-23T13:57:25.799284
Apache-2.0
true
ca41c822b3c55e5a290e664fc048fba3
// RUN: %target-typecheck-verify-swift\n\nprotocol P {\n associatedtype A : P where A.X == Self\n associatedtype X : P where P.A == Self\n // expected-error@-1{{cannot access associated type 'A' from 'P'; use a concrete type or generic parameter base instead}}\n}\n
dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\0159-rdar40009245.swift
0159-rdar40009245.swift
Swift
267
0.8
0
0.333333
awesome-app
417
2024-02-09T22:04:36.912636
Apache-2.0
true
0b0820e128afdb1c720afe8a2d5a48ec
// RUN: %target-swift-frontend %s -emit-ir\n\n// https://github.com/apple/swift/issues/50493\n\nfunc foo<U>(_ x: U?) {\n _ = "\(anyLabelHere: x)"\n}\n\n// This one also crashes in a slightly different place\nfunc bar(_ x: Int?) {\n _ = "\(anyLabelHere: x)"\n}\n
dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\0160-issue-50493.swift
0160-issue-50493.swift
Swift
251
0.8
0
0.333333
react-lib
418
2024-06-25T08:14:18.913516
GPL-3.0
true
cdc3101bed8fcf5e43a6a669abfb5d00
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck %s -verify\n// REQUIRES: objc_interop\n\nimport Foundation\n\n@objc protocol P {\n func foo(a arg: Int) // expected-note {{protocol requires function 'foo(a:)' with type '(Int) -> ()'}}\n}\n\nclass C : P {\n// expected-error@-1 {{type 'C' does no...
dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\0160-rdar41141944.swift
0160-rdar41141944.swift
Swift
547
0.95
0.176471
0.428571
vue-tools
335
2024-02-01T00:03:40.815237
MIT
true
e0a06c2bc150fa0c6e0c4be022c353be
// RUN: %target-typecheck-verify-swift\n\n// https://github.com/apple/swift/issues/49119\n\nprotocol P {\n associatedtype A: P // expected-note {{protocol requires nested type 'A'}} \n}\n\nstruct Type<Param> {}\nextension Type: P where Param: P, Param.A == Type<Param> {\n // expected-error@-1 {{extension of generic...
dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\0161-issue-49119.swift
0161-issue-49119.swift
Swift
727
0.95
0.055556
0.533333
node-utils
246
2025-04-27T18:38:41.637333
GPL-3.0
true
2775dae8786a9ba1c7f7882b65f7184d
// RUN: %target-typecheck-verify-swift\n\n// https://github.com/apple/swift/issues/50552\n\nprotocol P {}\nstruct A<C> {}\nextension A: P where A: P {}\n
dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\0162-issue-50552.swift
0162-issue-50552.swift
Swift
146
0.8
0
0.4
awesome-app
148
2024-01-14T09:39:40.090640
MIT
true
695c39fa4cc3aeae5dd396ef0cf586ac
// RUN: %target-typecheck-verify-swift\n\n// https://github.com/apple/swift/issues/50566\n\nstruct Foo<T> {}\n\nprotocol P1 {\n associatedtype A // expected-note {{protocol requires nested type 'A'}}\n}\nextension Foo: P1 where A : P1 {}\n// expected-error@-1 {{extension of generic struct 'Foo' has self-referential ...
dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\0163-issue-50566.swift
0163-issue-50566.swift
Swift
554
0.95
0.133333
0.583333
node-utils
24
2025-04-23T05:51:00.065519
MIT
true
4f682392e3f9e9e0188a5ad5c5dc7503
// RUN: %target-typecheck-verify-swift -debug-generic-signatures 2>&1 | %FileCheck %s\n\n// https://github.com/apple/swift/issues/50522\n\nprotocol P1 {}\nprotocol P2 {}\n\nstruct Var<N> {}\n\nextension Var : P2 where N : P1 { }\n\nprotocol P3 {}\n\n// CHECK: ExtensionDecl line={{.*}} base=Var\n// CHECK: Generic signat...
dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\0164-issue-50522.swift
0164-issue-50522.swift
Swift
366
0.8
0
0.4
awesome-app
783
2024-09-18T02:30:30.914362
BSD-3-Clause
true
6b64d30cf994f1266b61abeffee2dae9
// RUN: %target-typecheck-verify-swift\n\n// https://github.com/apple/swift/issues/48001\n// Used to crash with "apply expression is not marked as throwing or\n// non-throwing".\n\nstruct S : Error {}\nfunc f(op: (() throws -> Void)?) rethrows { try op?() }\ntry? f(op: { throw S() })\n
dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\0165-issue-48001.swift
0165-issue-48001.swift
Swift
277
0.8
0.222222
0.571429
awesome-app
498
2024-05-24T00:22:10.712538
BSD-3-Clause
true
8b533d1629a13c6ed2800b0bdb193524
// RUN: %target-typecheck-verify-swift\n\n// https://github.com/apple/swift/issues/50772\n\nstruct Box<Representation> {\n let value: Representation\n}\nenum Repr {}\nextension Repr {\n typealias RawEnum = ()\n}\nextension Box where Representation == Repr {\n init(rawEnumValue: Representation.RawEnum) {\n ...
dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\0165-issue-50772-1.swift
0165-issue-50772-1.swift
Swift
331
0.8
0
0.142857
node-utils
66
2025-06-13T05:12:59.669879
GPL-3.0
true
1b7849151ca917ffd1f37b1409c028a9
// RUN: %target-typecheck-verify-swift\n\npostfix operator %\npostfix func % (_: Any) {}\n\nprefix operator ~\nprefix func ~ (_: Any) {}\n\nfunc foo(_: String) -> Void {}\nfunc foo(_: Int) -> Void {}\n\n_ = foo("answer")% // Ok\n_ = ~foo(42) // Ok\n\nclass A {\n func bar(_: Int) {}\n}\n\nextension A {\n func ba...
dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\0165-rdar40722855.swift
0165-rdar40722855.swift
Swift
366
0.95
0.041667
0.055556
node-utils
405
2024-07-02T01:10:24.403603
BSD-3-Clause
true
a4139703a27de7d316652b23071fb8fd
// RUN: %target-typecheck-verify-swift\n// RUN: %target-swift-frontend -typecheck %s -debug-generic-signatures 2>&1 | %FileCheck %s\n\n// https://github.com/apple/swift/issues/50772\n\nstruct Box<Representation, T> {\n let value: Representation\n}\nenum Repr {}\nextension Repr {\n typealias RawEnum = ()\n}\n\n// ...
dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\0166-issue-50772-2.swift
0166-issue-50772-2.swift
Swift
631
0.8
0
0.277778
awesome-app
949
2025-06-01T01:36:06.592443
BSD-3-Clause
true
57d47030ecc09c14998217dec7c4f2d9
// RUN: %target-swift-frontend %s -emit-ir\n\nprotocol P {}\n\nclass Base<T: P> {}\n\nclass Derived: Base<Derived>, P {}\n
dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\0166-rdar30168645.swift
0166-rdar30168645.swift
Swift
115
0.95
0.285714
0.25
node-utils
726
2025-05-14T09:58:01.621931
BSD-3-Clause
true
74aef5f56feb25f5e336ce041af3b580
// RUN: %target-swift-frontend %s -emit-ir\n\nprotocol X {\n associatedtype R : Y\n}\n\nprotocol Y {\n associatedtype Q : X where Q.R == Self\n}\n\nstruct B : Y {\n typealias Q = L<B> \n}\n\nstruct L<V : Y> : X {\n typealias R = V\n}\n
dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\0167-rdar39059582.swift
0167-rdar39059582.swift
Swift
222
0.8
0
0.076923
node-utils
69
2024-07-28T19:07:17.898923
Apache-2.0
true
73555cff7667a899f2409b8b1fc30fb2
// RUN: %target-swift-frontend -emit-sil %s\n\nprotocol X1 {\n associatedtype X3 : X4\n}\n\nprotocol X4 {\n associatedtype X15\n}\n\nprotocol X7 { }\n\nprotocol X9 : X7 {\n associatedtype X10 : X7\n}\n\nstruct X12 : X9 {\n typealias X10 = X12\n}\n\nstruct X13<I1 : X7> : X9 {\n typealias X10 = X13<I1>\n}\n\nstruct ...
dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\0168-rdar40164371.swift
0168-rdar40164371.swift
Swift
602
0.8
0
0.030303
vue-tools
406
2025-06-21T01:53:34.315439
MIT
true
4dee4c15d3b6b413e198223d911e2ff5
// RUN: %target-swift-frontend -emit-sil %s\n\n// https://github.com/apple/swift/issues/50711\n\nprotocol SignalInterface {\n associatedtype OutputValue\n}\n\nclass Signal<OV>: SignalInterface {\n typealias OutputValue = OV\n}\n\nextension Signal {\n func foo<U>(_: U) -> SignalChannel<[U], Signal<Array<U>>>\n wher...
dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\0169-issue-50711.swift
0169-issue-50711.swift
Swift
433
0.95
0.052632
0.153846
react-lib
466
2023-10-29T02:52:18.117709
Apache-2.0
true
b04cc883cc35dc7bca2958dcde817f07
// RUN: not %target-swift-frontend -emit-ir %s\n\nprotocol ObservableType {\n associatedtype E\n}\n\nextension ObservableType where E == Any {\n static func zip<O1>(_ source1: O1) { fatalError() }\n}\n\nextension ObservableType {\n static func zip<O1, O2>(_ source1: O1, _ source2: O2) { fatalError() }\n}\n\nclass Ob...
dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\0169-rdar42448618.swift
0169-rdar42448618.swift
Swift
398
0.95
0.052632
0.071429
vue-tools
285
2024-12-14T23:22:12.518508
GPL-3.0
true
bd9722c972504efc4ccefb40ede40d6a
// RUN: not %target-swift-frontend -typecheck %s\n\n// https://github.com/apple/swift/issues/50996\n\nfunc receive() {}\nfunc test() {\n receive { (dat: Container<>) in\n dat\n }\n}\n
dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\0170-issue-50996.swift
0170-issue-50996.swift
Swift
178
0.8
0
0.25
python-kit
819
2023-09-28T08:33:41.151095
GPL-3.0
true
9a1e95aab56474c2ddfa4786524bcd64
// RUN: not %target-swift-frontend -typecheck %s\n\n// https://github.com/apple/swift/issues/51157\n\nprotocol P {}\nprotocol Q {}\nclass A : P {}\nclass B : A {}\n\nstruct A<T:B> {\n var x: T { fatalError("death") }\n}\n
dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\0171-issue-51157.swift
0171-issue-51157.swift
Swift
210
0.95
0.166667
0.222222
python-kit
827
2024-01-22T22:31:48.383883
MIT
true
a123d9201569e58fb57fac2ba95ddda1
// RUN: not %target-swift-frontend -typecheck %s\n\n// Was crashing in associated type inference.\n\nprotocol P {\n associatedtype Assoc\n\n subscript(i: Int) -> Assoc { get }\n func f() -> Assoc\n}\n\nstruct X<T, U> { }\n\nextension P {\n subscript<T>(i: T) -> X<T, Self> { return X<T, Self>() }\n func f<T>() -> X...
dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\0172-rdar-44235762.swift
0172-rdar-44235762.swift
Swift
360
0.8
0
0.153846
react-lib
705
2024-10-26T02:04:49.535239
Apache-2.0
true
a70d037692aa897b4dabef39f9de6b44
// RUN: %empty-directory(%t)\n// RUN: %target-build-swift -emit-module-path %t/foo.swiftmodule -Xfrontend -debug-generic-signatures %s 2>&1 | %FileCheck %s\n\npublic protocol P { }\npublic struct X<T: P> {\n public init() { }\n}\n\n// CHECK-LABEL: main.(file).Q@\n// CHECK-NEXT: Requirement signature: <Self where Self....
dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\0173-circular-generic-type-alias-deserialization.swift
0173-circular-generic-type-alias-deserialization.swift
Swift
607
0.8
0
0.222222
react-lib
948
2024-02-25T09:39:17.006025
MIT
true
39686977dd3acfe239d4487d1d6c2911
// RUN: not %target-swift-frontend -typecheck %s\n\nprotocol P {\n associatedtype A\n}\n\nfunc foo<T: P>(_: () throws -> T) -> T.A? {\n fatalError()\n}\n\n_ = foo() { fatalError() } & nil\n
dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\0174-rdar44770297.swift
0174-rdar44770297.swift
Swift
180
0.8
0
0.125
node-utils
224
2023-08-21T18:13:02.279633
Apache-2.0
true
f143a0e7946bc32a48e43bfbd82e6751
// RUN: not %target-swift-frontend -typecheck %s\n\n// https://github.com/apple/swift/issues/51320\n\npublic protocol LocalizedError : Error {\n var errorDescription: String? { get }\n}\n\npublic enum AFError: Error {}\nextension AFError {\n public var isInvalidURLError: Bool {\n\nextension AFError: LocalizedErro...
dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\0175-issue-51320.swift
0175-issue-51320.swift
Swift
371
0.8
0
0.181818
node-utils
130
2024-05-29T11:59:11.011751
BSD-3-Clause
true
ee0cd5ac33446b8439a0ff629fc36e74
// RUN: not %target-swift-frontend -typecheck %s\n\n// https://github.com/apple/swift/issues/50627\n\n@objc protocol Foo {\n associatedtype Bar\n var property: Generic<Bar> { get }\n}\n\nclass Generic<Element> {\n}\n\nclass FooImpl<T>: NSObject, Foo {\n let property: Generic<T>\n}\n\n
dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\0176-issue-50627.swift
0176-issue-50627.swift
Swift
278
0.95
0.125
0.181818
node-utils
53
2025-01-29T13:22:13.749661
BSD-3-Clause
true
5f720d1ee06954d36da64915ada4b0d1
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -typecheck -primary-file %s %S/Inputs/0177-rdar-33093935-other.swift -verify\n\n// REQUIRES: objc_interop\n\nimport Foundation\n\nextension A {\n static func superclass() -> AnyObject? { return nil }\n @objc var name: String { return "hi" }\n}\n\nclass B: ...
dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\0177-rdar-33093935.swift
0177-rdar-33093935.swift
Swift
352
0.95
0.071429
0.2
vue-tools
441
2024-04-30T06:51:35.383358
GPL-3.0
true
86e71e0a46099eb365fa03d0d60f4b56
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -c -primary-file %s %S/Inputs/0178-rdar-45060773-other.swift -o /dev/null\n\n// REQUIRES: objc_interop\n\nfunc doit() {\n MyCls().something(true)\n}\n
dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\0178-rdar-45060773.swift
0178-rdar-45060773.swift
Swift
206
0.95
0
0.4
node-utils
989
2024-12-28T13:27:39.436900
MIT
true
009b1232d02b17154585c85507c8f88b
// RUN: not %target-swift-frontend -typecheck %s\n\nprotocol P {\n associatedtype M\n}\n\nstruct S<M> {}\n\nextension S: P where Self.M == P.M {}\n
dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\0179-rdar44963974.swift
0179-rdar44963974.swift
Swift
139
0.8
0
0.166667
react-lib
366
2024-04-29T12:29:23.853229
MIT
true
5a58b747612f0a8008871da3cf974e59
// RUN: not %target-swift-frontend -typecheck %s\n\n// https://github.com/apple/swift/issues/51525\n\nclass Graph<V>: Collection {\n typealias Iterator = AnyIterator<V>\n typealias Index = Int\n}\n
dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\0180-issue-51525.swift
0180-issue-51525.swift
Swift
191
0.95
0.125
0.333333
python-kit
188
2023-09-26T16:35:01.985047
MIT
true
7f500f9baceefb792f538c3d3d1eff56
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) %s -typecheck -verify\n\n// REQUIRES: objc_interop\n\nimport Foundation\n\nclass MyClass: NSObject {\n func f() {\n let url = URL(url) // expected-error{{use of local variable 'url' before its declaration}}\n // expected-note@-1 {{'url' declared here}...
dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\0180-rdar45557325.swift
0180-rdar45557325.swift
Swift
389
0.95
0.076923
0.4
awesome-app
120
2024-12-16T06:07:28.257161
BSD-3-Clause
true
04d084326c484574b90807991593293f
// RUN: %target-swift-frontend -emit-ir -g -o - %s \n\n// REQUIRES: objc_interop\n\n// https://github.com/apple/swift/issues/51435\n\nimport Foundation\npublic final class Foo: NSObject, Collection {\n public var storage = [String: Any]()\n \n public typealias DictionaryType = [String: Any]\n public typealias Index...
dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\0181-issue-51435.swift
0181-issue-51435.swift
Swift
1,413
0.95
0.020833
0.083333
awesome-app
200
2025-06-23T05:59:21.735692
GPL-3.0
true
99438dfae118d7365f22fd486e0c23b0
// RUN: %target-swift-frontend -emit-ir %s\n\npublic protocol Graph: class, Collection {\n associatedtype V\n associatedtype E\n}\n\npublic protocol EdgeContainer {\n associatedtype E\n associatedtype Visitor: NeighboursVisitor where Visitor.C == Self\n\n func push(_ thing: E)\n}\n\npublic protocol Neigh...
dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\0182-rdar45680857.swift
0182-rdar45680857.swift
Swift
710
0.95
0.068966
0.047619
node-utils
765
2024-02-25T09:45:11.037349
GPL-3.0
true
e41ecc5107dd4f43379f7c5e05339bc8
// RUN: not %target-swift-frontend -emit-ir %s\n\n// https://github.com/apple/swift/issues/51501\n\nprotocol P {\n associatedtype A: Q where A.B == Self\n}\n\nprotocol Q {\n associatedtype B: P where B.A == Self\n}\n\nstruct S1<T>: P where T: Q { }\n\nstruct S2: Q {\n typealias B = S1<S2>\n}\n
dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\0183-issue-51501.swift
0183-issue-51501.swift
Swift
286
0.8
0
0.166667
awesome-app
988
2025-04-27T13:17:53.400359
Apache-2.0
true
8d61997b169d8aca84b051171a9ab5a3
// RUN: %target-swift-frontend -emit-ir %s\n\n@discardableResult public func applyWrapped<T, U>(function: Optional<(T) -> U>, to value: Optional<T>) -> Optional<U> {\n switch (function, value) {\n case (let .some(f), let .some(v)):\n return .some(f(v))\n case (.none, _):\n return .none\n case ...
dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\0184-8764.swift
0184-8764.swift
Swift
353
0.95
0.25
0.090909
python-kit
168
2023-08-25T02:27:57.219314
Apache-2.0
true
0a670da1e7e22040c92dfddfa8e4122e
// RUN: not %target-swift-frontend -emit-ir %s\n\n// https://github.com/apple/swift/issues/51520\n\npublic final class Action<Input, Error: Swift.Error> {\n\nextension Action {\n\npublic enum ActionError<Error: Swift.Error>: Swift.Error {\n case disabled\n
dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\0185-issue-51520.swift
0185-issue-51520.swift
Swift
247
0.95
0.1
0.333333
python-kit
830
2024-01-27T03:44:02.655492
GPL-3.0
true
532e999733a53efffe90f6b624125889
// RUN: %target-typecheck-verify-swift\n\nprotocol P {\n func isEqual(_ other: P) -> Bool\n}\n\nstruct A {\n var value: P? = nil\n}\n\nstruct B {\n func foo() throws -> A {}\n}\n\nstruct E {\n func getB(_ flag: inout Bool) throws -> B {\n return B()\n }\n}\n\nfunc foo(arr: [E], other: P) -> Bool {\n return arr...
dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\0186-rdar46497155.swift
0186-rdar46497155.swift
Swift
517
0.8
0.064516
0.038462
awesome-app
398
2024-09-20T09:19:22.841109
GPL-3.0
true
1682680a904af29645e743f358a4fe6a
// RUN: not %target-swift-frontend -typecheck %s\n\nprotocol P: class { }\n\nprotocol Q {\n func g()\n}\n\nprotocol P { }\n\nstruct S : Q {\n @_implements(P, g())\n func h() {}\n}\n\n
dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\0187-rdar46678653.swift
0187-rdar46678653.swift
Swift
171
0.95
0.066667
0.1
node-utils
358
2025-03-01T20:11:43.362964
BSD-3-Clause
true
acf050d657bb665c74d29a4603bf492f
// RUN: %target-swift-frontend -typecheck %s\n\n// https://github.com/apple/swift/issues/51951\n\nprotocol P1 {\n associatedtype A1\n}\n\nprotocol P2 {\n associatedtype A2\n}\n\nstruct S1<G1: P1, G2: P1>: P1 where G1.A1 == G2.A1 {\n typealias A1 = G1.A1\n}\n\nstruct S2<G1: P1, G2: P2>: P2 where G1.A1 == G2.A2 ...
dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\0188-issue-51951.swift
0188-issue-51951.swift
Swift
466
0.8
0
0.105263
vue-tools
23
2023-07-17T21:21:19.367682
BSD-3-Clause
true
53d187dde830515619214fe2a5496d23
// RUN: %target-swift-frontend -emit-ir -verify %s\n// RUN: %target-swift-frontend -emit-ir -verify -disable-requirement-machine-concrete-contraction %s\n\n// https://github.com/apple/swift/issues/52436\n\nprotocol P1 {\n associatedtype A2 : P2 where A2.A1 == Self\n}\n\nprotocol P2 {\n associatedtype A1 : P1 where A1...
dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\0189-issue-52436.swift
0189-issue-52436.swift
Swift
861
0.95
0.16
0.25
vue-tools
282
2024-10-02T18:11:59.592795
BSD-3-Clause
true
54f3d05244403d7b5cefae65d7abc45f
// RUN: %target-typecheck-verify-swift\n\nstruct A<T> {\n let foo: [T]\n}\n\nextension A : Codable where T: Codable {\n enum CodingKeys: String, CodingKey {\n case foo = "foo"\n }\n}\n
dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\0189-rdar49371608.swift
0189-rdar49371608.swift
Swift
179
0.8
0
0.111111
awesome-app
223
2024-11-06T10:57:59.714880
MIT
true
fbcc7c697d2412a1b76f0405433740b5
// RUN: not %target-typecheck-verify-swift\n\nstruct Foo {\n public func subscribe(_: @escaping () -> Void) {}\n public static func foo() {}\n\n func bind() {\n subscribe {\n _ = "\(foo)"\n }\n }\n}\n
dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\0190-rdar48852402.swift
0190-rdar48852402.swift
Swift
203
0.8
0
0.1
python-kit
719
2024-04-08T19:27:26.709604
GPL-3.0
true
fc9c27e156d3be8a24a735dc9575b28b
// RUN: %target-swift-frontend -typecheck %s\n\n// https://github.com/apple/swift/issues/51961\n\nprotocol P {\n associatedtype A\n}\n\nstruct S1: P {\n typealias A = Int\n}\n\nstruct S2<G: P>: P {\n typealias A = G.A\n}\n\nstruct S3<G: P> {\n}\n\nextension S3 where G == S2<S1> {\n typealias B = G.A\n}\n
dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\0191-issue-51961.swift
0191-issue-51961.swift
Swift
295
0.8
0
0.125
node-utils
18
2024-07-11T09:19:50.341162
MIT
true
ddfdfcbef1510ca2b920b9a9e261faa3
// RUN: %target-swift-frontend -emit-ir %s\n\nprotocol Tuple {\n associatedtype Head\n associatedtype Tail : Tuple\n}\n\nextension Pair : Tuple where Second : Tuple {\n typealias Head = First\n typealias Tail = Second\n}\n\nprotocol HomogeneousTuple : Tuple, Collection\n where Tail : HomogeneousTuple, Head == Tail...
dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\0192-rdar39826863.swift
0192-rdar39826863.swift
Swift
779
0.8
0
0.038462
awesome-app
263
2025-07-03T23:10:03.966091
BSD-3-Clause
true
92dbc648e3dac8e15fc968bca40c2464
// RUN: %target-swift-frontend -emit-module-path /dev/null %s\n\n// https://github.com/apple/swift/issues/52656\n\nfunc foo<T>(_: (T) -> ()) -> T { fatalError() }\n\nlet y = foo { (x: @escaping () -> (), y: Int) in }\n
dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\0193-issue-52656.swift
0193-issue-52656.swift
Swift
211
0.8
0
0.5
react-lib
453
2025-06-14T22:11:41.027039
Apache-2.0
true
8c9b5607e12595ff4a13a476aabb8845
// RUN: not %target-swift-frontend -typecheck %s\n\nopen class Foo {\n open class func foo<T: Equatable>(value: T?, other: T?) {\n switch (value, other) {\n case (.some(let unwrappedValue &), .none): // the & here triggers it\n fallthrough\n default:\n fatalError()\n }\n }\n}\n
dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\0194-rdar49731284.swift
0194-rdar49731284.swift
Swift
290
0.95
0.25
0.090909
awesome-app
672
2024-05-08T09:51:02.517560
Apache-2.0
true
55fc9c4989958eaa3d0a8f1a6c43236f
// RUN: %target-swift-frontend -disable-availability-checking -emit-ir -o /dev/null %s\n\nprotocol P {\n associatedtype AT\n func foo() -> AT\n}\n\nstruct X<C1: Collection, C2: Collection, T>: P\n where C1.Element == C2.Element\n{\n func foo() -> some P {\n return self\n }\n}\n
dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\0194-rdar50309503.swift
0194-rdar50309503.swift
Swift
274
0.8
0
0.083333
python-kit
221
2025-05-03T21:44:10.638429
GPL-3.0
true
1b2de559e9f902ec39e0381e604cb935
// RUN: %target-swift-frontend %s -emit-ir\n\n// rdar://problem/48223824\n// https://github.com/apple/swift/issues/52357\n// Compiler rejects well-formed code that triggered a fallback diagnostic due\n// to a bad substitution\n\nstruct GenericThing <Param1, Param2> {\n init (closure: (String)->()) {\n \n }...
dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\0196-issue-52357.swift
0196-issue-52357.swift
Swift
646
0.8
0
0.238095
react-lib
25
2024-10-21T02:17:38.014946
BSD-3-Clause
true
f295e7b1ec5fd218afc4baf4492ad727
// RUN: %target-typecheck-verify-swift\n\nprotocol P {}\n\nfunc fn<T, U: P>(_ arg1: T, arg2: (T) -> U) {}\n// expected-note@-1 {{required by global function 'fn(_:arg2:)' where 'U' = '()'}}\n\nfunc test(str: String) {\n fn(str) { arg in // expected-error {{type '()' cannot conform to 'P'}} expected-note {{only concret...
dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\0196-rdar48937223.swift
0196-rdar48937223.swift
Swift
456
0.95
0.083333
0.222222
react-lib
578
2024-02-14T10:30:44.640470
MIT
true
801de9cfdc40494796c35f4d7daddf0d
// RUN: not %target-swift-frontend -typecheck -verify %s\n\n// https://github.com/apple/swift/issues/51518\n\nprivate struct Collector {\n init() {}\n\n func appending(_ result: Int) -> Collector {\n return self\n }\n}\n\nfunc testing(ary: [String]) {\n let result1 = ary\n .compactMap { _ in\n result2.fo...
dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\0197-issue-51518.swift
0197-issue-51518.swift
Swift
428
0.8
0
0.125
node-utils
425
2024-06-25T22:00:03.240504
Apache-2.0
true
c1dc4053389840543a3bd965fb237ad0
// RUN: not %target-swift-frontend -typecheck %s\n@propertyWrapper\npublic struct Wrapper<T> {\n public var wrappedV: T // part-way through typing wrappedValue\n \n public init(initialValue: T) {\n self.value = initialValue\n }\n \n public init(body: () -> T) {\n self.value = body()\n ...
dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\0198-rdar52081852.swift
0198-rdar52081852.swift
Swift
862
0.8
0
0.030303
react-lib
821
2023-12-04T22:24:44.056010
BSD-3-Clause
true
c1d3851d8981c22ad86273884d4d91bb
// RUN: %target-swift-frontend -emit-ir -primary-file %s %S/Inputs/issue-52030-other.swift -module-name foo\n\n// https://github.com/apple/swift/issues/52030\n\nprotocol P {\n associatedtype A\n typealias T = S1<Self>\n}\n\nstruct S1<G: P>: Sequence, IteratorProtocol {\n mutating func next() -> G.A? {\n ...
dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\0199-issue-52030.swift
0199-issue-52030.swift
Swift
370
0.8
0
0.166667
node-utils
91
2024-08-06T04:59:13.281428
MIT
true
cd594fd513ba5d081338dc6a7eb62c3b
// RUN: %target-swift-frontend -typecheck %s -verify\n\npublic protocol MyBindableObject {}\n\n@propertyWrapper\npublic struct MyBinding<T> where T : MyBindableObject { // expected-error{{internal initializer 'init(wrappedValue:)' cannot have more restrictive access than its enclosing property wrapper type 'MyBinding' ...
dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\0199-rdar52679284.swift
0199-rdar52679284.swift
Swift
587
0.95
0.071429
0.083333
react-lib
879
2024-03-11T03:43:10.186025
BSD-3-Clause
true
28035ad9e087dad321f41d800f6ae8c3
// RUN: not %target-swift-frontend -typecheck %s\n\nprotocol P {\n associatedtype T\n}\n\nclass G<T : P> {\n init(_: T.T) {}\n}\n\nclass Sub : G<S> {}\n\nstruct S : P {}\n\nSub()\n
dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\0200-rdar48994748.swift
0200-rdar48994748.swift
Swift
167
0.95
0.133333
0.1
vue-tools
438
2025-07-03T09:34:33.591886
Apache-2.0
true
c6fb19563322ef6ff06be12920aec73f
// RUN: not %target-swift-frontend -typecheck %s\npublic struct Use { @Wrap var value: some Doubl = 1.0 }\n@propertyWrapper public struct Wrap { public var wrappedValue: Double }\n\n
dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\0201-rdar53120878.swift
0201-rdar53120878.swift
Swift
178
0.8
0
0.333333
node-utils
633
2023-11-15T20:39:47.188310
Apache-2.0
true
0589d50e962c50e580e065ebca017097
// RUN: not %target-swift-frontend -typecheck %s\nprotocol MyBindableObject {}\n\n@propertyWrapper\nstruct MyBinding<T> where T : MyBindableObject {\n public var wrappedV: T\n public var wrapperValue: MyBinding<T> {\n return self\n }\n public init(initialValue: T) {\n self.value = initialValue...
dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\0202-rdar53183030.swift
0202-rdar53183030.swift
Swift
515
0.95
0.047619
0.05
react-lib
521
2025-01-18T23:47:17.500613
BSD-3-Clause
true
8300988aedd0c1afe67ae37ad01b117a
// RUN: not %target-swift-frontend -typecheck %s\n\n// https://github.com/apple/swift/issues/53545\n\nenum S<Value> {\n @propertyWrapper \n private struct A {\n var s:UInt = 0\n var wrappedValue:Value { didSet { } }\n \n init(wrappedValue:Value) { self.wrappedValue = wrappedValue }\n }\n \n @propertyWr...
dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\0203-issue-53545.swift
0203-issue-53545.swift
Swift
750
0.95
0.025
0.0625
awesome-app
681
2024-03-21T00:46:00.788357
BSD-3-Clause
true
8c44fc4d5b98de26d5365f69962fd497
// RUN: not %target-swift-frontend -typecheck %s\n{\n static func ??= (lhs: inout Optional, rhs: Optional) {}\n}\n
dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\0204-rdar54150921.swift
0204-rdar54150921.swift
Swift
111
0.8
0
0.25
awesome-app
868
2024-11-19T21:11:59.153322
Apache-2.0
true
887311d1997fdcd4a0a79e86089d293a
// RUN: not %target-swift-frontend -typecheck %s\n\nclass A {\n var member: B\n\nprotocol B {\n typealias Elem = Undefined<Int, <#placeholder#>\n\ntypealias C = Undefined<Int\n
dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\0205-rdar54321473.swift
0205-rdar54321473.swift
Swift
169
0.95
0.111111
0.166667
python-kit
879
2024-10-29T03:51:13.916020
BSD-3-Clause
true
48b6fa6a0927e89843a2deb163e4789b
// RUN: %target-swift-frontend -emit-silgen %s\n// FIXME: Get the above to pass with -emit-ir too.\n\npublic protocol P1 {\n associatedtype A1: P3 where A1.A4.A3: P6\n}\n\npublic protocol P12 : P1 where A1: P2 {}\n\npublic protocol P2 : P3 where A3 == S3<A2>, A4: P4 {}\n\npublic protocol P4 : P3 where A3 == S2<A2>, ...
dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\0206-rdar54952911.swift
0206-rdar54952911.swift
Swift
956
0.8
0
0.0625
react-lib
736
2024-04-06T14:49:15.421831
Apache-2.0
true
2effbb5d4cf6fc7c267c7435e95bf1e3
// RUN: %target-swift-frontend -emit-ir %s\n\n// https://github.com/apple/swift/issues/49919\n\npublic protocol TypedParserResultTransferType {\n // Remove type constraint\n associatedtype Result: ParserResult\n}\n\npublic struct AnyTypedParserResultTransferType<P: ParserResult>: TypedParserResultTransferType {\n...
dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\0207-issue-49919.swift
0207-issue-49919.swift
Swift
1,080
0.8
0
0.266667
awesome-app
289
2024-08-10T20:33:19.708700
BSD-3-Clause
true
16aefc3ee26d593cac03c81e78d1087b
// RUN: not %target-swift-frontend %s -typecheck -o /dev/null\n\nextension Result {\n extension Result where Result.Undefined == Int {\n
dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\0207-rdar55502661.swift
0207-rdar55502661.swift
Swift
133
0.8
0
0.333333
awesome-app
978
2023-11-02T10:34:49.706939
GPL-3.0
true
6dfa4f374fc28c6dabdb521a4a94dd73
// RUN: not %target-swift-frontend -typecheck %s %S/Inputs/0208-rdar55864759-protocol.swift\nstruct StringInterpolation: MagicStringInterpolationProtocol {}\n\n
dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\0208-rdar55864759.swift
0208-rdar55864759.swift
Swift
157
0.8
0
0.5
vue-tools
334
2025-06-28T13:50:41.554625
Apache-2.0
true
7486d156f6bd744b932e1797301100f3
// RUN: not %target-swift-frontend -typecheck %s\n\n// rdar://problem/45590743 used to crash\nclass Base {\n var x = 0\n}\n\nclass Derived : Base {\n override var x = Derived().x\n}\n
dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\0209-rdar45590743.swift
0209-rdar45590743.swift
Swift
175
0.95
0.2
0.25
react-lib
865
2025-07-08T07:52:08.286669
MIT
true
6f352855d1fce6b41b048f0273d63322
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) %s -typecheck -verify\n// REQUIRES: objc_interop\n\nimport Foundation\n\n@objc class A : NSObject {\n @objc var x: Int = 42\n}\n\n@propertyWrapper\nstruct Attr<V> {\n var wrappedValue: V {\n get { fatalError() }\n }\n\n init(wrappedValue: V, key: KeyP...
dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\0210-rdar57356196.swift
0210-rdar57356196.swift
Swift
373
0.95
0.095238
0.125
python-kit
678
2024-07-30T06:25:47.381839
BSD-3-Clause
true
218b0d8e0f602b1980352d29da32645f
// RUN: %target-swift-frontend -emit-sil %s\n\n// Properly make inherited initializers 'async' when needed.\n@available(SwiftStdlib 5.5, *)\nclass Base {\n required init() async { }\n}\n\n@available(SwiftStdlib 5.5, *)\nclass Derived: Base { }\n\n\n@available(SwiftStdlib 5.5, *)\nclass Base2 {\n required init() async...
dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\0211-rdar80353441.swift
0211-rdar80353441.swift
Swift
379
0.95
0.2
0.142857
vue-tools
923
2025-05-06T17:57:11.419661
GPL-3.0
true
6be97f108233815d26664c6bdb682107
// RUN: %target-swift-frontend -import-objc-header %S/Inputs/0212-header.h -emit-sil %s\n\nextension MyPoint {\n var x: Int { Int(y) }\n}\n\npublic func printIt(point: MyPoint) {\n print(point)\n}\n
dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\0212-rdar85840928.swift
0212-rdar85840928.swift
Swift
191
0.95
0
0.142857
react-lib
23
2024-09-01T10:08:18.986765
MIT
true
02d1292e281b2eb946fb35e0812cf12f
// RUN: not %target-swift-frontend -parse %s\n\n// https://github.com/apple/swift/issues/60702\n\n@\n#if true\n print("x")\n#endif\n
dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\0213-issue-60702.swift
0213-issue-60702.swift
Swift
127
0.8
0.125
0.666667
awesome-app
463
2024-01-28T07:17:43.881081
Apache-2.0
true
95029662d9c8a601ddd34df3f136f9e9
// This source file is part of the Swift.org open source project\n// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors\n// Licensed under Apache License v2.0 with Runtime Library Exception\n//\n// See https://swift.org/LICENSE.txt for license information\n// See https://swift.org/CONTRIBUTORS.txt for t...
dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\28872-rdar45583135.swift
28872-rdar45583135.swift
Swift
817
0.8
0.136364
0.631579
vue-tools
193
2023-12-28T09:13:14.311323
BSD-3-Clause
true
898956c86a707c2cbbdb1dba73bec5e3
// RUN: %target-swift-frontend %s -typecheck\n\n// https://github.com/apple/swift/issues/43442\n\nfunc quickSort<T: Comparable>(_ a: [T]) -> [T] {\n if a.isEmpty {\n return a\n } else {\n let head = a[0]\n let body = a[1..<a.count]\n return quickSort(body.filter({$0 < head})) + [head] + quickSort(body.fil...
dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\issue-43442.swift
issue-43442.swift
Swift
335
0.8
0.076923
0.181818
node-utils
840
2025-06-17T08:50:32.235034
GPL-3.0
true
db4fadb5f93da7f4d16c4e67f42c7505
// RUN: %target-swift-frontend -emit-ir %s -disable-objc-attr-requires-foundation-module\n// REQUIRES: objc_interop\n\n// https://github.com/apple/swift/issues/43937\n\n@objc protocol TestProtocol {\n func foo(i: Int)\n}\n\nclass Test : TestProtocol {\n @objc func foo(i: Int) {\n }\n}\n\nfunc bar(t: TestProtoc...
dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\issue-43937.swift
issue-43937.swift
Swift
356
0.95
0.055556
0.214286
node-utils
802
2024-03-07T09:22:21.835368
MIT
true
93b8643c1bd3917870ee0aa3c6a7d614
// RUN: %target-swift-frontend -emit-ir %s\n\n// https://github.com/apple/swift/issues/46786\n\npublic protocol SomeProto {\n associatedtype ThingType\n func getThing() -> ThingType\n}\n\npublic protocol SpecialThing: RandomAccessCollection {\n}\n\npublic protocol Castable {\n associatedtype Source\n static func cas...
dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\issue-46786.swift
issue-46786.swift
Swift
1,140
0.8
0
0.055556
node-utils
372
2025-07-04T05:15:19.036459
MIT
true
026a0c95bb8e60fee0673318adfcb5d7
// RUN: %target-swift-frontend -emit-ir %s\n\n// https://github.com/apple/swift/issues/47148\n\nfunc add(_ a: Int, _ b: Int) throws -> Int {\n return a + b\n}\n\nfunc add(_ a: Int, _ b: Int) -> Float {\n return Float(a + b)\n}\n\nfunc useAdd() {\n guard let c: Float = try? add(3, 4) else {\n return\n ...
dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\issue-47148.swift
issue-47148.swift
Swift
323
0.8
0.055556
0.142857
react-lib
291
2024-03-25T05:37:21.950724
GPL-3.0
true
710c71afaa8f8c1401755b2e0ee395ba
// RUN: %empty-directory(%t)\n// RUN: %target-swift-frontend -emit-module -o %t %s -I %S/Inputs/issue-47904/ -module-name TEST\n// RUN: echo 'import TEST; x' | not %target-swift-frontend -typecheck - -I %S/Inputs/issue-47904/ -I %t\n\n// REQUIRES: objc_interop\n\n// https://github.com/apple/swift/issues/47904\n\nimport...
dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\issue-47904.swift
issue-47904.swift
Swift
664
0.95
0
0.238095
react-lib
54
2024-01-27T01:08:36.321974
BSD-3-Clause
true
8ea65ddee7843ea68d9fc0dc1ad00e73
// RUN: not %target-typecheck-verify-swift\n\n// https://github.com/apple/swift/issues/48406\n\nextension Dictionary {\n func doSomething<T>() -> [T : Value] {\n let pairs: [(T, Value)] = []\n return Dictionary(uniqueKeysWithValues: pairs)\n }\n}\n
dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\issue-48406.swift
issue-48406.swift
Swift
246
0.8
0
0.25
react-lib
745
2024-10-30T19:31:23.363279
MIT
true
df28b7eea541785d8b3429c7658274ad