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 -typecheck %s\n\n// https://github.com/apple/swift/issues/49550\n\nstruct Foo: OptionSet {\n let rawValue: Int\n static let none = Foo(rawValue: 1 << 0)\n}\n\nextension Foo: ExpressibleByIntegerLiteral { }\n | dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\issue-49550.swift | issue-49550.swift | Swift | 234 | 0.8 | 0 | 0.285714 | python-kit | 946 | 2023-11-25T23:48:10.027222 | MIT | true | 175d2a3baebb10148f74d5673bb8b437 |
// RUN: not %target-swift-frontend -typecheck %s\n\n// https://github.com/apple/swift/issues/50977\n\nenum Foo {\n case BigA {\n }\n case littleA(BigA)\n}\n | dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\issue-50977.swift | issue-50977.swift | Swift | 156 | 0.8 | 0 | 0.285714 | awesome-app | 561 | 2024-10-15T16:04:38.934654 | Apache-2.0 | true | 29130502e5939ec7e3dcff2ecc49e191 |
// 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\issue-50988-0-invalid-read-get-extra-info.swift | issue-50988-0-invalid-read-get-extra-info.swift | Swift | 456 | 0.8 | 0.166667 | 0.888889 | python-kit | 499 | 2024-03-08T00:03:30.954072 | BSD-3-Clause | true | 49b55e6b0b09144f35eefff051687d35 |
// 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\issue-50988-1-invalid-read-get-extra-info.swift | issue-50988-1-invalid-read-get-extra-info.swift | Swift | 478 | 0.8 | 0.142857 | 0.727273 | vue-tools | 32 | 2025-01-06T04:04:45.447471 | Apache-2.0 | true | 88ba8ad6de3cf34f82cb77329ce4b111 |
// 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\issue-50988-2-invalid-read-get-extra-info.swift | issue-50988-2-invalid-read-get-extra-info.swift | Swift | 457 | 0.8 | 0.166667 | 0.888889 | node-utils | 129 | 2023-12-14T13:17:05.272871 | GPL-3.0 | true | 73f3700f8d57c2f478db7ef9139955db |
// 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\issue-50988-3-invalid-read-get-extra-info.swift | issue-50988-3-invalid-read-get-extra-info.swift | Swift | 462 | 0.8 | 0.166667 | 0.888889 | react-lib | 294 | 2024-02-18T09:44:32.661972 | MIT | true | ce6bce229c3ef25b4259d3827e9036c8 |
// 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\issue-50988-4-invalid-read-get-extra-info.swift | issue-50988-4-invalid-read-get-extra-info.swift | Swift | 455 | 0.8 | 0.166667 | 0.888889 | awesome-app | 864 | 2024-05-04T03:46:39.166013 | BSD-3-Clause | true | d4e13f30b2cce3a0e8a233fbb91a039d |
// RUN: %target-swift-frontend -emit-ir %s\n\n// https://github.com/apple/swift/issues/50990\n\nfinal class Baz {}\n\nfinal class Bar {\n private let x: Baz\n init(x: Baz) {\n self.x = x\n }\n}\n\nfinal class Foo {\n private var bar: Bar?\n\n private func navigate(with baz: Baz?) {\n bar = ... | dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\issue-50990.swift | issue-50990.swift | Swift | 412 | 0.95 | 0.130435 | 0.111111 | vue-tools | 76 | 2024-02-12T23:10:27.896848 | BSD-3-Clause | true | ad5a661024f8dea8df5fdaf6e85333be |
// RUN: not %target-swift-frontend -emit-ir %s\n\n// https://github.com/apple/swift/issues/51690\n// Just make sure we don't crash.\n\nprotocol Publicable {\n associatedtype PublicModel\n\n func publicized() -> PublicModel\n}\n\n\nprotocol WithReturnType {\n associatedtype MainType\n associatedtype ReturnTy... | dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\issue-51690.swift | issue-51690.swift | Swift | 1,025 | 0.8 | 0 | 0.073171 | vue-tools | 200 | 2023-12-19T13:09:20.248315 | BSD-3-Clause | true | 5ae5d693a701a6f369e8794ae8052555 |
// RUN: %target-swift-frontend -emit-ir -primary-file %s %S/Inputs/issue-51714-other.swift -module-name M\n// RUN: %target-swift-frontend -emit-ir %s -primary-file %S/Inputs/issue-51714-other.swift -module-name M\n\n// https://github.com/apple/swift/issues/51714\n\nprotocol P1 {\n associatedtype P1_T1\n associate... | dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\issue-51714.swift | issue-51714.swift | Swift | 494 | 0.8 | 0 | 0.230769 | python-kit | 301 | 2024-03-15T19:34:06.503629 | MIT | true | 1e5cee4deab08f72ab22a5015a33ae26 |
// RUN: %target-typecheck-verify-swift -requirement-machine-max-rule-length=4\n\n// https://github.com/apple/swift/issues/52031\n\nstruct S<N> {}\n\nprotocol P {\n associatedtype A: P = Self\n static func f(_ x: A) -> A\n}\n\nextension S: P where N: P {\n static func f<X: P>(_ x: X) -> S<X.A> where A == X, X.A == N ... | dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\issue-52031.swift | issue-52031.swift | Swift | 720 | 0.95 | 0.05 | 0.375 | vue-tools | 626 | 2025-07-07T09:05:57.336836 | Apache-2.0 | true | 8f05eee8ad48e6dc1effaaa3e2b9023d |
// RUN: %target-swift-frontend -Xllvm -sil-verify-after-pass=loadable-address -emit-ir -o %t.ll %s\n\n// https://github.com/apple/swift/issues/52260\n// Just make sure we don't crash.\n\n\nstruct Large {\n var a: Int = 1\n var b: Int = 1\n var c: Int = 1\n var d: Int = 1\n var e: Int = 1\n var f: Int = 1\n var g... | dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\issue-52260.swift | issue-52260.swift | Swift | 411 | 0.8 | 0 | 0.1875 | awesome-app | 558 | 2025-06-08T11:44:34.524647 | BSD-3-Clause | true | ce58eb6b5a0b561627df53aa3c13fbbc |
// RUN: not %target-swift-frontend -emit-silgen %s\n\n// https://github.com/apple/swift/issues/52464\n// Just make sure we don't crash.\n\nfunc foo(x: inout Int = 0) {}\nfoo()\n | dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\issue-52464.swift | issue-52464.swift | Swift | 170 | 0.8 | 0 | 0.6 | python-kit | 333 | 2025-02-22T10:10:21.014678 | GPL-3.0 | true | d8ee0e0c58e5ad0940a4a5eb6c568fb5 |
// RUN: not %target-swift-frontend -typecheck %s\n\n// https://github.com/apple/swift/issues/52510\n// Just make sure we don't crash.\n\nenum Crash: String {\n case foo\n case bar(String)\n \n static let shared = Crash()\n}\n\nextension Crash {\n init() { self = .foo }\n}\n | dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\issue-52510.swift | issue-52510.swift | Swift | 266 | 0.8 | 0 | 0.272727 | vue-tools | 444 | 2023-09-13T13:15:31.305075 | Apache-2.0 | true | a71eec191817c1bdc2a9ac51147f8ec1 |
// RUN: not %target-swift-frontend -emit-sil %s\n// REQUIRES: OS=ios\n\nimport UIKit\n\n// https://github.com/apple/swift/issues/52548\n// Just make sure we don't crash.\n\nclass Foo: NSObject {\n func crash() {\n let kp = \AnyObject.accessibilityFrame\n }\n}\n | dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\issue-52548.swift | issue-52548.swift | Swift | 253 | 0.95 | 0.076923 | 0.4 | vue-tools | 795 | 2024-07-17T13:21:49.274844 | Apache-2.0 | true | e717ebb04ba2d58a81de34e4a958e05e |
// RUN: %target-swift-frontend -typecheck -verify %s\n\n// https://github.com/apple/swift/issues/52601\n\nstruct A {\n typealias Value = Int\n}\n\nprotocol B {\n typealias Value = A.Value\n typealias T = String\n}\n\nprotocol NestedProtocol {\n typealias _B = B\n}\n\nstruct Something: NestedProtocol {\n\n struct I... | dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\issue-52601.swift | issue-52601.swift | Swift | 530 | 0.8 | 0 | 0.068966 | awesome-app | 895 | 2024-11-09T22:24:35.993313 | BSD-3-Clause | true | 87950da92895c39c9c0248cbd0768b85 |
// RUN: %target-swift-frontend -typecheck %s\n\n// https://github.com/apple/swift/issues/53012\n\nprotocol P1: class {\n associatedtype P1P1: P1\n associatedtype P1AnyP2: AnyP2<P1P1>\n \n var anyP2: P1AnyP2? { get set }\n}\n\nprotocol P2 {\n associatedtype P2P1: P1\n}\n\nfinal class AnyP2<AP2P1: P1>: P2 ... | dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\issue-53012.swift | issue-53012.swift | Swift | 336 | 0.95 | 0.111111 | 0.153846 | awesome-app | 31 | 2024-04-28T18:25:55.590268 | Apache-2.0 | true | 83a442100f87e9c74c9730eff06fa17b |
// RUN: %target-swift-frontend -emit-ir %s\n\n// https://github.com/apple/swift/issues/53182\n\nprotocol DateGroupedCollection: Collection {\n typealias DictionaryType = [String: Int]\n\n typealias Index = DictionaryType.Index\n typealias Element = DictionaryType.Element\n}\n | dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\issue-53182.swift | issue-53182.swift | Swift | 269 | 0.8 | 0 | 0.285714 | react-lib | 150 | 2025-07-06T00:04:27.001248 | Apache-2.0 | true | 3ae07a3508eb1188f9249c408b014b51 |
// RUN: %target-swift-frontend -emit-sil %s\n\n// https://github.com/apple/swift/issues/53328\n\n@propertyWrapper\nstruct Foo<T> {\n init(wrappedValue: T) {\n self.wrappedValue = wrappedValue\n }\n\n var wrappedValue: T\n}\n\n@propertyWrapper\nstruct Bar<T> {\n init(wrappedValue: T) {\n self.wrappedValue = wr... | dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\issue-53328.swift | issue-53328.swift | Swift | 484 | 0.8 | 0 | 0.090909 | python-kit | 408 | 2023-11-27T20:28:11.945416 | MIT | true | 9de3d6bbbb333eacf2a56beaf9d79586 |
// RUN: not %target-swift-frontend -typecheck %s\n\n// https://github.com/apple/swift/issues/53382\n\nprotocol P {}\nstruct S<T> {}\nextension S : P where T : P {}\n\nfunc foo(_ fn: (S<String>) -> Void) {}\nfunc bar(_ fn: (P) -> Void) {\n foo(fn)\n}\n | dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\issue-53382.swift | issue-53382.swift | Swift | 240 | 0.8 | 0 | 0.222222 | react-lib | 744 | 2024-03-26T23:45:45.541373 | MIT | true | 70bb6ef2fcc58afa04cbfed9772a399f |
// 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\issue-53417.swift | issue-53417.swift | Swift | 1,098 | 0.8 | 0.058824 | 0.333333 | awesome-app | 735 | 2023-12-22T04:00:36.639763 | Apache-2.0 | true | dcd92410040419e8974ca51728f86ea7 |
// RUN: %target-swift-frontend -O -emit-ir %s\n\n// https://github.com/apple/swift/issues/53420\n\npublic class Coordinator: ConcreteCoordinator {\n public func coordinate() {\n\n }\n}\n\npublic typealias ConcreteCoordinator = InternalBaseCoordinator & CoordinatorProtocol\n\npublic protocol CoordinatorProtocol {\... | dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\issue-53420.swift | issue-53420.swift | Swift | 993 | 0.95 | 0.06383 | 0.0625 | python-kit | 771 | 2024-10-15T00:06:01.237104 | Apache-2.0 | true | 6641cb080b8027920dd0113f02d9c9b6 |
// RUN: %target-typecheck-verify-swift\n\n// https://github.com/apple/swift/issues/53441\n\nprotocol ProtoA {\n associatedtype AType1\n}\n\nprotocol ProtoB {\n associatedtype AType2: ProtoA\n func protoFunc() -> AType2.AType1\n}\n\nextension ProtoB {\n typealias Alias = AType2.AType1\n}\n\nstruct Concrete<A... | dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\issue-53441-typealias.swift | issue-53441-typealias.swift | Swift | 453 | 0.8 | 0 | 0.1 | awesome-app | 535 | 2024-01-09T18:53:10.755216 | BSD-3-Clause | true | 5e3d56c81bc93034db3a608f5e9d4b72 |
// RUN: %target-swift-frontend -emit-ir %s\n\n// https://github.com/apple/swift/issues/53454\n\nstruct MyText<V> {\n let label: String\n let value: V\n}\n\nextension MyText where V == Void {\n init(_ label: String, defaulted: Int = 17) {\n self.label = label\n self.value = ()\n }\n}\n\nstruct ImagePulse {\n ... | dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\issue-53454.swift | issue-53454.swift | Swift | 571 | 0.95 | 0.034483 | 0.086957 | react-lib | 371 | 2023-10-22T21:38:02.015107 | GPL-3.0 | true | 1b8e6fe122ddd6ef8818286f1b212620 |
// RUN: not %target-swift-frontend -typecheck %s\n\n// https://github.com/apple/swift/issues/53477\n\nfunc foo(x: Int) {}\nfunc foo(line: String = #line) {}\nfoo()\n | dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\issue-53477.swift | issue-53477.swift | Swift | 158 | 0.8 | 0 | 0.4 | node-utils | 211 | 2024-08-03T08:23:48.804984 | BSD-3-Clause | true | 4edf2c239009625b51ad43499a592cb3 |
// RUN: %target-swift-emit-silgen %s\n\n// https://github.com/apple/swift/issues/53503\n\nprotocol Example {\n associatedtype Signed: SignedInteger\n associatedtype SP: StringProtocol\n var string: String { get }\n}\nextension Example {\n var string: String {\n return "Foo"\n }\n}\nclass MyClass<T... | dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\issue-53503.swift | issue-53503.swift | Swift | 564 | 0.95 | 0.037037 | 0.086957 | react-lib | 640 | 2024-06-30T01:07:47.870871 | GPL-3.0 | true | 94c4253b806d6fea461f82519958e831 |
// RUN: %target-swift-frontend -emit-ir -module-name M -primary-file %S/Inputs/issue-53550-other.swift -primary-file %s\n// RUN: %target-swift-frontend -emit-ir -module-name M %S/Inputs/issue-53550-other.swift %s\n\n// https://github.com/apple/swift/issues/53550\n\nclass WatchRegistry {\n func single<S: Snapshotting... | dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\issue-53550.swift | issue-53550.swift | Swift | 692 | 0.95 | 0.176471 | 0.214286 | python-kit | 921 | 2023-10-29T02:47:56.439623 | GPL-3.0 | true | 8cd04561fb819df5ea3dbd49a80511e4 |
// RUN: not %target-swift-emit-silgen %s\n\n// https://github.com/apple/swift/issues/53633\n\nprotocol Pub {\n associatedtype Other\n associatedtype Failure: Error\n}\n\nclass AnyPub<Other, Failure: Error> {}\n\nextension Pub {\n func erase() -> AnyPub<Other, Failure> {\n return AnyPub<Other, Failure>()\n }\n}\n... | dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\issue-53633.swift | issue-53633.swift | Swift | 678 | 0.95 | 0.071429 | 0.095238 | awesome-app | 209 | 2024-03-10T14:49:07.566353 | BSD-3-Clause | true | 7dd7616af9065dfb7eac96531893c0ee |
// RUN: not %target-swift-frontend -typecheck %s\n\n// https://github.com/apple/swift/issues/53637\n\npublic func trichotomy<T : Comparable>(x: T, y: T) -> some Comparable {\n if x < y { return -1 } \n else if x == y { return 0 }\n return 1\n}\n\npublic func myTri<T: Comparable, U: Comparable> (retval: UnsafeMutable... | dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\issue-53637.swift | issue-53637.swift | Swift | 431 | 0.8 | 0.142857 | 0.2 | node-utils | 134 | 2024-05-19T11:04:12.948648 | GPL-3.0 | true | 1a689fd271fadcca86133c741052253a |
// RUN: %target-swift-frontend -emit-ir %s\n\n// https://github.com/apple/swift/issues/53793\n\nprotocol P1 {\n associatedtype X\n associatedtype A: P2 where A.X == X\n}\n\nprotocol P2 {\n associatedtype X\n}\n\nstruct S {}\n\nextension S {\n struct A: P2 {\n typealias X = Int\n }\n}\n\n\nextensio... | dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\issue-53793.swift | issue-53793.swift | Swift | 337 | 0.8 | 0 | 0.117647 | vue-tools | 672 | 2024-03-08T15:43:20.178302 | BSD-3-Clause | true | 6557589a5ac75245626d60ce8c675c3c |
// RUN: not %target-swift-frontend -typecheck %s\n\n// https://github.com/apple/swift/issues/53795\n\nprotocol Foo {}\nfunc foo(_ bar: Foo) {}\nfoo(true ? "a" : "b")\n | dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\issue-53795.swift | issue-53795.swift | Swift | 160 | 0.8 | 0 | 0.4 | node-utils | 551 | 2025-01-03T10:34:03.519841 | MIT | true | f91dbf3f43fdac65c5bc3308530b763f |
// RUN: %target-swift-frontend %s -typecheck -verify\n\n// https://github.com/apple/swift/issues/53910\n\n@propertyWrapper\npublic struct Wrapper<Value> {\n public init(someValue unused: Int) {\n _ = unused\n }\n \n public var wrappedValue: Value?\n}\n\n\nfunc functionScope() {\n let scopedValue = 3 // expected... | dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\issue-53910.swift | issue-53910.swift | Swift | 749 | 0.95 | 0 | 0.176471 | awesome-app | 600 | 2024-03-14T11:39:40.385916 | Apache-2.0 | true | 42930863394b770b71fa954fc0da3a9b |
// RUN: %target-swift-frontend -typecheck %s -verify\n\n// https://github.com/apple/swift/issues/54004\n\n@propertyWrapper \nstruct A {\n var wrappedValue: Int\n}\n\n@propertyWrapper \nstruct B {\n var wrappedValue: Int\n}\n\nstruct C {\n @A @B var foo: Int // expected-error{{composed wrapper type 'B' does not match... | dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\issue-54004.swift | issue-54004.swift | Swift | 351 | 0.8 | 0 | 0.153846 | awesome-app | 885 | 2024-12-27T02:55:54.485597 | GPL-3.0 | true | 3b5d0cb65c5c04bf38d8b6e725b5736c |
// RUN: not %target-swift-frontend -typecheck %s\n\n// https://github.com/apple/swift/issues/54005\n\n@propertyWrapper struct A {\n var wrappedValue: Int\n}\n\n@propertyWrapper struct B {\n var wrappedValue: Int\n}\n\nstruct C {\n @A @B var foo: Int?\n}\n | dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\issue-54005.swift | issue-54005.swift | Swift | 243 | 0.8 | 0 | 0.181818 | react-lib | 433 | 2024-02-10T02:56:46.079016 | Apache-2.0 | true | 4ba30372463224dfc1f9975c93e975ca |
// 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\issue-54035.swift | issue-54035.swift | Swift | 678 | 0.95 | 0.227273 | 0.5 | node-utils | 103 | 2023-09-24T14:29:10.418316 | GPL-3.0 | true | ccb8a2fc1420265e6d05bde6515d7b40 |
// RUN: %target-swift-frontend -primary-file %s -emit-silgen\n\n// https://github.com/apple/swift/issues/54048\n\n@propertyWrapper\nstruct MutatingGetNonMutatingSetWrapper<T> {\n private var fixed: T\n \n var wrappedValue: T {\n mutating get { fixed }\n nonmutating set { }\n }\n \n init(wrappedValue initial... | dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\issue-54048.swift | issue-54048.swift | Swift | 419 | 0.8 | 0 | 0.125 | node-utils | 998 | 2024-04-19T17:26:38.261422 | Apache-2.0 | true | c72cae1f76065c2d2934f2b0bf285713 |
// RUN: %target-swift-frontend -emit-ir -primary-file %s -debug-generic-signatures 2>&1 | %FileCheck %s\n\n// https://github.com/apple/swift/issues/54050\n\npublic protocol FooProtocol {\n associatedtype Bar\n}\n\npublic struct Foo<Bar>: FooProtocol {\n public var bar: Bar\n}\n\npublic protocol BazProtocol: FooProtoc... | dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\issue-54050.swift | issue-54050.swift | Swift | 657 | 0.8 | 0 | 0.266667 | react-lib | 890 | 2025-01-05T04:26:44.796541 | BSD-3-Clause | true | 66d57a20dcb4dc4e04b013f6dbd5b0a6 |
// RUN: %target-swift-frontend %s -typecheck -verify\n\n// https://github.com/apple/swift/issues/54093\n\n@propertyWrapper \nstruct Wrapper1 {\n var wrappedValue: Int?\n}\n\nclass Test1 {\n @Wrapper1 var user: Int \n // expected-error@-1 {{property type 'Int' does not match 'wrappedValue' type 'Int?'}}\n}\n\n@proper... | dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\issue-54093.swift | issue-54093.swift | Swift | 606 | 0.95 | 0.086957 | 0.222222 | react-lib | 2 | 2024-11-14T10:15:58.839501 | MIT | true | 845b6535bee6d6fb26418bbbd5ff4d51 |
// RUN: %target-swift-frontend %s -typecheck -verify\n\n// https://github.com/apple/swift/issues/54359\n\nfunc f(_ closure: @autoclosure () -> String...) {} // expected-error {{'@autoclosure' must not be used on variadic parameters}}\nf("A") // No crash\n | dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\issue-54359.swift | issue-54359.swift | Swift | 249 | 0.8 | 0 | 0.5 | awesome-app | 440 | 2024-08-17T09:49:12.927254 | Apache-2.0 | true | 1a8329336e946d248cd582430170e003 |
// RUN: %target-swift-frontend -emit-ir -O %s\n\n// https://github.com/apple/swift/issues/54758\n\nprotocol A {\n associatedtype Foo // Does not crash if renamed\n}\n\nprotocol B {\n associatedtype Foo // Does not crash if renamed\n var aFoo: Foo { get }\n}\n\npublic struct Wrapper<T> {\n let wrapped: T\n}\... | dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\issue-54758.swift | issue-54758.swift | Swift | 934 | 0.8 | 0.068182 | 0.117647 | awesome-app | 383 | 2024-12-03T00:08:55.771281 | BSD-3-Clause | true | 05dcf052a60c84a47c3c2fd3446f0069 |
// RUN: %target-swift-frontend -emit-ir %s\n\n// https://github.com/apple/swift/issues/54913\n\nprotocol Dismissable {\n func dismiss(completion: @escaping () -> Void)\n}\n\ntypealias Completion = (Dismissable?) -> Void\n\nprotocol Cancelable: AnyObject {\n func cancel()\n}\n\nprotocol Controller {\n func asyn... | dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\issue-54913.swift | issue-54913.swift | Swift | 1,357 | 0.95 | 0.017857 | 0.047619 | react-lib | 238 | 2025-04-17T14:34:01.718992 | GPL-3.0 | true | f009dcb65a7ea9334e3b41c412cbc62e |
// RUN: %target-swift-emit-silgen %s\n\n// https://github.com/apple/swift/issues/54938\n\nclass Foo {\n init(f: @escaping () -> String = String.init) {\n }\n}\n | dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\issue-54938.swift | issue-54938.swift | Swift | 154 | 0.95 | 0.125 | 0.333333 | awesome-app | 563 | 2024-11-05T19:07:24.537760 | Apache-2.0 | true | 5d99afc513f7ba50dff118e5f64efd25 |
// RUN: not %target-swift-frontend -typecheck %s\n\n// https://github.com/apple/swift/issues/55135\n\nstruct CountSteps1<T> : Collection {\n init(count: Int) { self.count = count }\n var count: Int\n\n var startIndex: Int { 0 }\n var endIndex: Int { count }\n func index(after i: Int) -> Int { \n totalSteps += 1... | dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\issue-55135.swift | issue-55135.swift | Swift | 553 | 0.8 | 0 | 0.095238 | react-lib | 885 | 2025-04-28T19:28:03.554337 | Apache-2.0 | true | 831c9d1c4c1a66a99520717a9d6d05a3 |
// RUN: %target-swift-emit-silgen %s -verify\n\n// https://github.com/apple/swift/issues/55167\n\nfunc thin(_: (@convention(thin) () -> Void) -> Void) {}\nfunc block(_: (@convention(block) () -> Void) -> Void) {}\nfunc c(_: (@convention(c) () -> Void) -> Void) {}\n\nfunc function(_: () -> Void) {}\n\nfunc context() {\n... | dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\issue-55167.swift | issue-55167.swift | Swift | 3,337 | 0.95 | 0.247191 | 0.233333 | awesome-app | 146 | 2024-02-21T11:36:53.427773 | BSD-3-Clause | true | c7a0d52a252fab976e27377695e34b90 |
// RUN: %target-swift-frontend -typecheck %s -verify\n\n// https://github.com/apple/swift/issues/55309\n\nenum E {\n case bar\n}\n\n@dynamicMemberLookup\nstruct S {\n subscript(dynamicMember key: KeyPath<E.Type, E>) -> Bool { true }\n}\n\n\nlet s = S()\nlet e = s.bar // expected-error {{dynamic key path member lo... | dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\issue-55309.swift | issue-55309.swift | Swift | 344 | 0.8 | 0 | 0.181818 | python-kit | 777 | 2024-11-27T16:00:48.098759 | BSD-3-Clause | true | 1cff34cd4c13f6c2d74e8e6e10ffe632 |
// RUN: %target-swift-frontend -typecheck %s -verify\n\n// https://github.com/apple/swift/issues/55435\n\nclass ContainerTransition {\n var viewControllers: [Int: String]?\n func completeTransition() {\n viewControllers?[Int//.max\n // expected-error@-1 {{cannot convert value of type 'Int.Type' to expected argu... | dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\issue-55435.swift | issue-55435.swift | Swift | 444 | 0.95 | 0.083333 | 0.4 | python-kit | 916 | 2024-03-21T03:28:30.188191 | MIT | true | 0422493b5d63d6c36bd8277d1e4a1eaa |
// RUN: %empty-directory(%t)\n// RUN: %target-swift-frontend -index-store-path %t/idx -o %t/file.o -typecheck -primary-file %s -verify\n\n// https://github.com/apple/swift/issues/55439\n\nprotocol MyProto {\n func compile() throws\n}\n\nfunc compile(x: MyProto) throws {\n try x.compile \n // expected-error@-1 {{func... | dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\issue-55439.swift | issue-55439.swift | Swift | 418 | 0.95 | 0.214286 | 0.454545 | vue-tools | 716 | 2023-11-07T10:42:05.019104 | GPL-3.0 | true | 2a3334787cdb7b8364bb08ca1ca1e590 |
// RUN: not %target-swift-frontend -typecheck %s\n\n// https://github.com/apple/swift/issues/55442\n\nfunc addProperties(b: Int) {\n guard true else {\n _ = "`\(b)`."\n | dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\issue-55442.swift | issue-55442.swift | Swift | 169 | 0.8 | 0 | 0.4 | awesome-app | 396 | 2024-01-01T20:21:15.579233 | BSD-3-Clause | true | f99404d8ac3cf85185025d5e40bea995 |
// RUN: %target-swift-frontend -typecheck %s -verify\n\n// https://github.com/apple/swift/issues/55443\n\nenum FooString: String { // expected-error {{'FooString' declares raw type 'String', but does not conform to RawRepresentable and conformance could not be synthesized}} expected-note {{add stubs for conformance}}\n... | dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\issue-55443.swift | issue-55443.swift | Swift | 1,815 | 0.95 | 0.47619 | 0.111111 | python-kit | 900 | 2024-08-09T23:20:38.178758 | MIT | true | 998ddce8f2fa579837835b1d0dd6352f |
// RUN: not %target-swift-frontend -typecheck %s\n\n// https://github.com/apple/swift/issues/55444\n\npublic final class Foo {\n public var a: String {\n return "\(backgroundContext)"\n | dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\issue-55444.swift | issue-55444.swift | Swift | 189 | 0.95 | 0.142857 | 0.4 | awesome-app | 268 | 2023-07-17T19:19:57.665987 | GPL-3.0 | true | 771ba15290560f4785d79c25682d70df |
// RUN: not %target-swift-frontend -typecheck %s\n\n// https://github.com/apple/swift/issues/55449\n\nfunc verifyDecoder<Decoder>() {\n\nextension ByteToMessageDecoderVerifier {\n\nclass RecordingChannel {\n func readInbound<T>(foo bar: Int) {}\n | dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\issue-55449.swift | issue-55449.swift | Swift | 237 | 0.95 | 0.1 | 0.333333 | python-kit | 608 | 2024-02-29T18:12:53.267613 | GPL-3.0 | true | 06e4101c18b001818f84f5443ed0ec7d |
// RUN: %target-typecheck-verify-swift\n\n// https://github.com/apple/swift/issues/55564\n\npublic struct S<T : Codable> : Codable {\n var s: [T]!\n}\n | dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\issue-55564.swift | issue-55564.swift | Swift | 145 | 0.8 | 0 | 0.4 | vue-tools | 338 | 2025-04-15T03:47:53.927104 | Apache-2.0 | true | 1e2cdf937160d0ebfd5c4675d72aacd7 |
// RUN: %target-swift-frontend -emit-ir %s\n\n// https://github.com/apple/swift/issues/55588\n\npublic protocol Book {\n associatedtype Name\n}\npublic protocol BookDecorator: Book where Name == DecoratedBook.Name {\n associatedtype DecoratedBook: Book\n associatedtype Name = DecoratedBook.Name\n}\npublic class Conc... | dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\issue-55588.swift | issue-55588.swift | Swift | 392 | 0.95 | 0.071429 | 0.166667 | react-lib | 419 | 2025-05-14T04:26:58.555652 | MIT | true | a17fe8a1f4de7ca83d6693f13cf17b89 |
// RUN: %target-swift-frontend -disable-availability-checking -emit-ir -o /dev/null %s\n\n// https://github.com/apple/swift/issues/55643\n\nprotocol MyProtocol {}\n\nfunc doNotCrash1() -> some MyProtocol {\n class MyClass1: MyProtocol {}\n return MyClass1()\n}\n\nvar doNotCrash2: some MyProtocol {\n class MyClass2: ... | dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\issue-55643.swift | issue-55643.swift | Swift | 344 | 0.95 | 0.133333 | 0.181818 | node-utils | 365 | 2024-06-19T17:40:40.523953 | MIT | true | 68b41c3e20d0ec78acc848d7cdaf69d3 |
// RUN: %target-swift-frontend -disable-availability-checking -emit-ir -o /dev/null %s\n\n// https://github.com/apple/swift/issues/55903\n\nfinal class Klass {\n static var current: Klass {\n fatalError()\n }\n}\nprivate struct Build<T> {\n let val: T\n unowned let unownedBinding = Klass.current\n unowned(unsaf... | dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\issue-55903.swift | issue-55903.swift | Swift | 469 | 0.95 | 0.055556 | 0.125 | python-kit | 274 | 2024-03-04T15:30:26.838705 | GPL-3.0 | true | 1ab7609f2120162b6c5ab23135473457 |
// RUN: %target-swift-frontend -typecheck %s\n\n// https://github.com/apple/swift/issues/55955\n\nclass Class: P {\n typealias A = Bool\n}\n\nprotocol P {\n associatedtype A\n}\n\nprotocol Q : P {\n func takesA(arg: A)\n}\n\nfunc test<T: Class & Q>(arg: T) {\n arg.takesA(arg: true)\n}\n | dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\issue-55955.swift | issue-55955.swift | Swift | 272 | 0.95 | 0.052632 | 0.142857 | awesome-app | 146 | 2024-08-30T14:18:37.570199 | Apache-2.0 | true | df33c4236d622eb26ef24664e79285c3 |
// RUN: %target-swift-emit-silgen %s\n\n// https://github.com/apple/swift/issues/56024\n\npublic var UNIMPLEMENTED: Never { fatalError("UNIMPLEMENTED") }\n\npublic func UNIMPLEMENTED(\n function: String = #function,\n file: StaticString = #file,\n line: UInt = #line\n) -> Never {\n fatalError("UNIMPLEMENTED... | dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\issue-56024.swift | issue-56024.swift | Swift | 467 | 0.95 | 0.157895 | 0.133333 | python-kit | 319 | 2023-12-22T15:09:44.374142 | BSD-3-Clause | true | 3f5923b0f5e19e1ecf3d1275f448d771 |
// RUN: %swift-ide-test -code-completion -code-completion-token=COMPLETE -source-filename %s\n\n// https://github.com/apple/swift/issues/56100\n\nextension Result {\n public init(_ value: Success?) {\n self = value.map(#^COMPLETE^#)\n }\n}\n\npublic func materialize<T>(_ f: T) {}\n | dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\issue-56100.swift | issue-56100.swift | Swift | 276 | 0.8 | 0 | 0.25 | awesome-app | 459 | 2024-03-03T11:09:43.747531 | BSD-3-Clause | true | ef71dd02b203825813a0bfac22341d3f |
// RUN: %target-typecheck-verify-swift -disable-objc-interop -module-name Foundation\n\n// https://github.com/apple/swift/issues/56110\n\n// Make sure we diagnose this even if the current module is named 'Foundation':\n@objc protocol Horse { // expected-error {{Objective-C interoperability is disabled}}\n func ride()\... | dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\issue-56110.swift | issue-56110.swift | Swift | 367 | 0.8 | 0.083333 | 0.333333 | node-utils | 588 | 2024-07-21T23:22:49.344748 | Apache-2.0 | true | 3337335d1188585c0161635858f0aae1 |
// RUN: %target-swift-frontend -emit-ir %s\n\n// https://github.com/apple/swift/issues/56124\n\nprotocol Projection {\n associatedtype Root\n associatedtype Path: PartialKeyPath<Root>\n static var path: Path { get }\n}\n\nstruct ProjectKey<Key, Value>: Projection {\n typealias Root = (Key, Value)\n typealias Path ... | dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\issue-56124.swift | issue-56124.swift | Swift | 393 | 0.8 | 0 | 0.166667 | python-kit | 165 | 2024-05-18T00:41:58.985510 | Apache-2.0 | true | 58673d3ef2663535eea7f42ff514c513 |
// RUN: %target-swift-frontend -emit-ir %s\n\n// https://github.com/apple/swift/issues/56247\n\npublic protocol Prot {\n associatedtype T\n}\n\npublic class C<P: Prot> where P.T: Hashable {\n}\n\npublic class Spam<P: Prot> where P.T == Int {\n public func m(_ f: (C<P>) -> C<P>) {\n }\n}\n | dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\issue-56247.swift | issue-56247.swift | Swift | 283 | 0.95 | 0.133333 | 0.181818 | awesome-app | 769 | 2025-05-04T03:53:17.745768 | BSD-3-Clause | true | 28196e28c423066a6065cdc7fd83c685 |
// RUN: not %target-swift-frontend -emit-ir %s\n\n// https://github.com/apple/swift/issues/56377\n\npublic protocol ProtoDelegate where Self.Manager.Delegate: Self {\n associatedtype Manager: ProtoManager\n func bind(to: Manager)\n}\n\npublic protocol ProtoManager where Self.Delegate.Manager: Self {\n associatedtype... | dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\issue-56377.swift | issue-56377.swift | Swift | 364 | 0.8 | 0 | 0.2 | node-utils | 35 | 2024-08-17T02:13:26.911637 | MIT | true | 5f1e3b5a319700f1de5968092436f90d |
// RUN: %target-swift-frontend -emit-ir %s -disable-availability-checking\n\n// https://github.com/apple/swift/issues/56782\n\npublic struct MyList: Sequence {\n var _list: [(Int, Int)]\n \n public func makeIterator() -> some IteratorProtocol {\n return _list.makeIterator()\n }\n}\n | dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\issue-56782.swift | issue-56782.swift | Swift | 279 | 0.8 | 0 | 0.25 | react-lib | 191 | 2024-08-19T04:18:01.994694 | BSD-3-Clause | true | 8c2e9b95dfa42680342b79f6663b346d |
// RUN: not %target-swift-frontend -typecheck %s\n\n// https://github.com/apple/swift/issues/56810\n\nprotocol Foo {}\n\nfunc withTrailingClosure(x: (Int) -> Void) {}\n\n_ = withTrailingClosure { (x) in\n extension Foo {\n func foo() {\n _ = MemoryLayout<Self>.size\n }\n }\n}\n | dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\issue-56810.swift | issue-56810.swift | Swift | 276 | 0.8 | 0 | 0.181818 | node-utils | 726 | 2023-11-29T23:42:34.241866 | Apache-2.0 | true | ac788cd6da89ce7b0787bed1101ac09b |
// RUN: %target-swift-frontend -emit-ir %s\n\n// https://github.com/apple/swift/issues/57019\n\nclass A { }\nclass B<T> : A { }\nclass C {\n func bar(x : (A?) -> Void) { }\n}\nclass D<T> : C {\n override func bar(x : (B<T>?) -> Void) { }\n}\n | dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\issue-57019.swift | issue-57019.swift | Swift | 232 | 0.95 | 0.333333 | 0.2 | awesome-app | 853 | 2024-03-22T02:49:13.874920 | BSD-3-Clause | true | c75a56e46da0764cc4d440d09ec9a126 |
// RUN: %target-swift-frontend -emit-ir %s\n\n// https://github.com/apple/swift/issues/57023\n\npublic protocol PublicContent {\n associatedtype Model\n init(_ model: Model)\n}\n\npublic protocol PublicConvertible {\n associatedtype Public\n func toPublic() -> Public\n}\n\nextension PublicConvertible where ... | dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\issue-57023.swift | issue-57023.swift | Swift | 578 | 0.8 | 0 | 0.1 | python-kit | 784 | 2025-05-31T02:46:05.034550 | MIT | true | e3770cc83a1526b3d03c442eaf748dc5 |
// RUN: %target-swift-frontend -typecheck -verify %s\n\n// https://github.com/apple/swift/issues/57241\n\nstruct S {\n private let data: [[String]]\n private func f() {}\n\n func test() {\n ForEach(data) { group in\n ForEach(group) { month in\n self.f()\n // expected-error@-1 {{type '()' cannot... | dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\issue-57241.swift | issue-57241.swift | Swift | 974 | 0.95 | 0 | 0.2 | node-utils | 438 | 2024-11-29T04:12:45.243933 | GPL-3.0 | true | 27bddf5074bd581c1327909061103a0f |
// RUN: %target-swift-frontend -emit-ir %s\n// REQUIRES: concurrency\n\n// https://github.com/apple/swift/issues/57570\n\nprivate struct TransformResult<T> {\n var index: Int\n var transformedElement: T\n\n init(index: Int, transformedElement: T) {\n self.index = index\n self.transformedElement =... | dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\issue-57570.swift | issue-57570.swift | Swift | 624 | 0.8 | 0.043478 | 0.157895 | react-lib | 508 | 2025-02-28T22:16:02.504975 | GPL-3.0 | true | 8d2fd32da41af5c129e80f782860d742 |
// RUN: not %target-swift-frontend -typecheck %s\n\n// https://github.com/apple/swift/issues/57752\n\npublic extension Array {\n func chunked(into size: Int) -> [[Element]] {\n return stride(from: 0, to: count, by: size).map { elt in\n self[elt\n\n\npublic extension Array where Element == Item {\n ... | dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\issue-57752.swift | issue-57752.swift | Swift | 390 | 0.8 | 0 | 0.181818 | react-lib | 482 | 2023-12-08T13:39:20.516018 | GPL-3.0 | true | e970cea5656bd3dddf35f5cc13c3aacc |
// RUN: not %target-swift-frontend -typecheck %s\n\n// https://github.com/apple/swift/issues/57802\n\npublic struct {\n @UserDefault()\n public static var region: String\n}\n\n@propertyWrapper\npublic struct UserDefault {\n init() {}\n public var wrappedValue: String\n}\n | dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\issue-57802.swift | issue-57802.swift | Swift | 271 | 0.8 | 0 | 0.181818 | react-lib | 646 | 2024-02-09T01:03:37.588847 | GPL-3.0 | true | 185524af4ff740843981525296c3b883 |
// RUN: %target-swift-frontend -typecheck %s\n\n// https://github.com/apple/swift/issues/57924\n\nprotocol P {\n associatedtype A: Sendable\n}\n\nstruct S<T>: P {\n typealias A = ()\n}\n | dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\issue-57924.swift | issue-57924.swift | Swift | 177 | 0.8 | 0 | 0.25 | vue-tools | 268 | 2024-01-23T14:48:47.302054 | Apache-2.0 | true | a4797170802244f2e7fa25da19e6e9c5 |
// RUN: %target-swift-frontend -emit-ir %s\n\n// https://github.com/apple/swift/issues/58100\n\npublic struct Observable<T> {}\n\npublic protocol BaseVariant: CaseIterable, Equatable {}\n\npublic protocol FeatureGate {\n associatedtype Variant: BaseVariant\n}\n\npublic enum FeatureVariantState<T: BaseVariant>: Equat... | dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\issue-58100.swift | issue-58100.swift | Swift | 727 | 0.8 | 0.08 | 0.117647 | awesome-app | 526 | 2025-01-13T23:14:47.612062 | MIT | true | 746bcc08bfaad81b01500a6b310aa068 |
// RUN: %target-swift-frontend -emit-sil -O %s\n\n// REQUIRES: objc_interop\n\n// https://github.com/apple/swift/issues/58337\n\nimport Foundation\n\n@objc protocol OptionalVar {\n @objc optional var name: String { get }\n}\n\nextension NSObject: OptionalVar { }\n\ndo {\n let objects = [NSObject()] as Array<Optiona... | dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\issue-58337.swift | issue-58337.swift | Swift | 382 | 0.95 | 0 | 0.230769 | vue-tools | 252 | 2025-01-14T16:05:38.290461 | Apache-2.0 | true | 3e61ab5d53a8db6e86bf95c606dbdfc9 |
// RUN: not %target-swift-frontend -emit-ir %s\n\nprotocol P1 {}\nprotocol Q1 {\n associatedtype A\n associatedtype B\n}\n\nprotocol Q2: Q1 where B == S<Self>, B.C == Self {}\n\nprotocol P2: P1 {\n associatedtype C: Q2 where C.A == Void\n}\n\nstruct S<C: Q2>: P2 {\n}\n | dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\issue-59384.swift | issue-59384.swift | Swift | 256 | 0.8 | 0 | 0.083333 | vue-tools | 932 | 2025-05-11T04:38:28.386664 | GPL-3.0 | true | 14b8488c7e494286dbb008a6d8d6407c |
// RUN: %target-swift-emit-ir %s\n\n// https://github.com/apple/swift/issues/59572\n\nfunc foo<T: RawRepresentable>(src: Any, target: inout T) where T.RawValue == UInt {\n if let x = src as? UInt, let x = T(rawValue: x) {\n target = x\n }\n}\n | dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\issue-59572.swift | issue-59572.swift | Swift | 239 | 0.8 | 0.111111 | 0.285714 | react-lib | 226 | 2024-08-13T19:46:27.548038 | GPL-3.0 | true | ae3ecb3ea5d9133b15eb1ec2630b27a9 |
// RUN: %target-swift-frontend -emit-ir -primary-file %s\n\nprivate typealias Word = UInt\n\n/// Returns the offset at which the `i`th bit can be found in an array of\n/// `Word`s.\nprivate func wordOffset(ofBit i: Int) -> Int {\n precondition(i >= 0)\n return i / Word.bitWidth\n}\n\n/// Returns a mask that isolates ... | dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\issue-59772.swift | issue-59772.swift | Swift | 2,861 | 0.8 | 0.030928 | 0.164557 | vue-tools | 782 | 2024-11-19T11:41:21.188307 | Apache-2.0 | true | 982c60b84ee3ea76608d4f9645835e39 |
// RUN: %target-typecheck-verify-swift\n\npublic struct Wrapped<Values>: Sequence where Values: Sequence {\n public var values: Values\n\n public func makeIterator() -> Values.Iterator {\n values.makeIterator()\n }\n}\n\n// expected-error@+1 {{reference to generic type 'Array' requires arguments in <...... | dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\issue-61031.swift | issue-61031.swift | Swift | 475 | 0.95 | 0 | 0.153846 | vue-tools | 494 | 2025-05-12T10:53:11.320847 | MIT | true | e3099bcb9afbd177499c2fdaa7040242 |
// RUN: %target-typecheck-verify-swift -dump-parse\n\n// https://github.com/apple/swift/issues/61806\n\nstruct I61806 {}\nextension I61806 {\n init() { }\n}\n\nclass I61806_C { \n init() {}\n}\nextension I61806_C {\n convenience init(a: Int) {}\n}\n\nprotocol I61806_P {}\nextension I61806_P {\n init() {}\n}\n | dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\issue-61086.swift | issue-61086.swift | Swift | 293 | 0.95 | 0.05 | 0.125 | react-lib | 501 | 2023-12-14T08:28:27.441485 | BSD-3-Clause | true | 068bd6b37e454d10851bf92af223e2c2 |
// RUN: %target-typecheck-verify-swift\n\nprotocol P {\n associatedtype A\n}\n\nstruct J<A> { }\n\n// expected-error@+2 {{same-type constraint 'Self' == 'J<Self.A>' is recursive}}\n// expected-error@+1 {{no type for 'Self' can satisfy both 'Self == J<Self.A>' and 'Self : P'}}\nextension P where Self == J<A> {\n stati... | dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\issue-63997.swift | issue-63997.swift | Swift | 333 | 0.8 | 0.076923 | 0.3 | react-lib | 466 | 2023-09-27T09:53:05.767318 | BSD-3-Clause | true | f258b63a583796ccd016f57d6813c257 |
// RUN: %target-swift-frontend -emit-ir %s\n\npublic func values<each T>() -> (repeat (each T)?) {\n (repeat { () -> (each T)? in\n nil\n }())\n}\n | dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\issue-66917.swift | issue-66917.swift | Swift | 145 | 0.8 | 0 | 0.166667 | react-lib | 964 | 2025-06-02T15:10:30.025015 | BSD-3-Clause | true | df4d1c12a346ab4e7f63bba1f1c60154 |
// RUN: %target-swift-frontend -emit-ir %s -disable-availability-checking\n\npublic struct S<each T> {\n public var value: (repeat each T)\n\n public init(_ value: repeat each T) {\n self.value = (repeat each value)\n let getters: (repeat () -> each T) = (repeat { each self.value })\n }\n}\n | dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\issue-68941.swift | issue-68941.swift | Swift | 305 | 0.8 | 0 | 0.125 | node-utils | 955 | 2025-03-08T10:58:19.312932 | MIT | true | 7caab8ccaaae6f95d16cc35b3768f983 |
// RUN: %target-swift-frontend -emit-ir %s\n\nclass Thing<T> {\n var value: T\n init(_ value: T) { self.value = value }\n\n func combineThings<each U>(head: Thing<T>, tail: repeat Thing<each U>) {\n repeat (each tail).doSomething(each tail) { _ in }\n }\n\n func doSomething(_ value: AnyObject, closure: @escapin... | dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\issue-69947.swift | issue-69947.swift | Swift | 330 | 0.95 | 0.083333 | 0.111111 | node-utils | 230 | 2025-07-08T00:23:42.209214 | GPL-3.0 | true | a42afae9e49b8154ddf03c7e43e6046c |
// RUN: %target-swift-frontend -emit-ir %s -disable-availability-checking\n\n// https://github.com/swiftlang/swift/issues/70429\n\npublic protocol Node: Sendable {}\npublic protocol BlockNode: Node {}\npublic protocol InlineNode: Node {}\n\n// MARK: - Block nodes\n\npublic struct Paragraph: BlockNode {\n public init()... | dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\issue-70429.swift | issue-70429.swift | Swift | 2,816 | 0.8 | 0.021505 | 0.2 | awesome-app | 181 | 2024-12-31T16:01:22.778672 | GPL-3.0 | true | 1eb1c856fab1e680a1794389b3391aec |
// RUN: %target-swift-frontend -emit-ir %s -disable-availability-checking\n\npublic protocol Signal {\n mutating func process() -> Float\n}\n\npublic struct Mixer<each Source: Signal> {\n public var sources: (repeat each Source)\n\n public mutating func process() -> Float {\n var result: Float = 0\n\n ... | dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\issue-71921.swift | issue-71921.swift | Swift | 490 | 0.8 | 0 | 0.0625 | node-utils | 914 | 2023-07-12T07:40:35.498608 | GPL-3.0 | true | ebc6082c99d3b0d6f3f70427a7f36bd7 |
// RUN: %target-swift-frontend -emit-ir %s\n\npublic func apply<Input, each Transformed>(\n _ transform: (repeat (Input) -> each Transformed),\n _ input: Input\n) -> (repeat each Transformed) {\n (repeat (each transform)(input))\n}\n\nstruct S: Equatable {\n // MARK: Equatables\n let eq = "🎛"\n let u = 1.0 / 1_0... | dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\issue-73829.swift | issue-73829.swift | Swift | 623 | 0.8 | 0 | 0.090909 | python-kit | 526 | 2024-06-06T15:51:13.701983 | GPL-3.0 | true | e3614f87362d5d423a3a5d9a901b5afd |
// RUN: %target-typecheck-verify-swift -target %target-swift-5.7-abi-triple\n\n// https://github.com/swiftlang/swift/issues/74545\n\nfunc Map<Source, Destination>(_ transform: @escaping (Source) -> Destination) -> any Sequence<Destination> {\n return []\n}\n\nfor i in Map({$0 + 1}) {\n print(i)\n}\n | dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\issue-74545.swift | issue-74545.swift | Swift | 291 | 0.8 | 0.090909 | 0.25 | python-kit | 952 | 2025-07-07T00:53:32.961125 | Apache-2.0 | true | f7eced4e9217bc6f56ed8fa375be5e6d |
// RUN: %target-swift-frontend -emit-ir %s -disable-availability-checking\n\nprotocol Cache<Object> {\n associatedtype Object\n associatedtype Snapshot: Sequence<Object>\n\n func entries(_ body: (Snapshot) -> Void) -> AsyncStream<Object>\n}\n\nfunc readFromCacheImpl<T>(cache: any Cache<T>) async {\n let upd... | dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\issue-74569.swift | issue-74569.swift | Swift | 383 | 0.8 | 0.071429 | 0.1 | vue-tools | 514 | 2025-02-04T07:28:32.710108 | GPL-3.0 | true | 8719844c0966ad4c9a05ecd1c530b0c7 |
// RUN: %target-swift-frontend -emit-ir %s -disable-availability-checking\n\nprotocol Context: Sendable {}\n\nprotocol Service<ServiceContext> {\n associatedtype ServiceContext: Context\n}\n\nprotocol Builder<BuilderContext> {\n associatedtype BuilderContext: Context\n\n init(context: BuilderContext?)\n\n f... | dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\issue-74721-2.swift | issue-74721-2.swift | Swift | 1,944 | 0.95 | 0.013158 | 0.035088 | awesome-app | 267 | 2023-12-16T23:36:00.456548 | MIT | true | e50c8842696c09a4c8097b3ba616a8e2 |
// RUN: %target-swift-frontend -emit-ir %s -disable-availability-checking\n\nprotocol ContextDescriptor: Sendable { }\n\nprotocol OutcomeDescriptor: Sendable { }\n\nprotocol ResultDescriptor: Sendable { }\n\nprotocol ErasedReducer<Context>: Sendable {\n associatedtype Context: ContextDescriptor\n associatedtype T... | dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\issue-74729.swift | issue-74729.swift | Swift | 2,108 | 0.95 | 0.098361 | 0.045455 | react-lib | 649 | 2025-01-07T20:51:50.777299 | GPL-3.0 | true | 12713fb83644e0d8e74ea574d43b155d |
// RUN: %target-swift-frontend -emit-ir %s -disable-availability-checking\n\n// https://github.com/swiftlang/swift/issues/75329\n\nstruct GPack1<each P, T> {}\nstruct GPack2<each P> {\n struct G<T> {}\n}\n\nfunc test<each T>(\n example1: repeat GPack1<repeat each T, each T>,\n example2: repeat GPack2<repeat each T>.... | dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\issue-75329.swift | issue-75329.swift | Swift | 366 | 0.8 | 0 | 0.166667 | awesome-app | 741 | 2024-11-12T00:44:04.908693 | GPL-3.0 | true | f48ebf3f34444e72ba90a38a8c86a61e |
func foo(a: Int) {\nif a > 1 {\nif a > 1 {\nif a > 1 {\nif a > 1 {\nif a > 1 {\nif a > 1 {\nif a > 1 {\nif a > 1 {\nif a > 1 {\nif a > 1 {\nif a > 1 {\nif a > 1 {\nif a > 1 {\nif a > 1 {\nif a > 1 {\nif a > 1 {\nif a > 1 {\nif a > 1 {\nif a > 1 {\nif a > 1 {\nif a > 1 {\nif a > 1 {\nif a > 1 {\nif a > 1 {\nif a > 1 {\n... | dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\parser-cutoff.swift | parser-cutoff.swift | Swift | 8,806 | 0.8 | 0.996207 | 0.002528 | python-kit | 425 | 2025-04-20T05:19:51.173526 | GPL-3.0 | true | 4175de9f742d7b460d689e2c7befadea |
// RUN: %target-swift-frontend -emit-ir %s\n\npublic protocol P1 {}\n\npublic protocol P2 {\n associatedtype A1\n var id: String { get }\n}\n\npublic protocol P3<A2> {\n associatedtype A2\n func execute() -> A2\n}\n\npublic protocol P4<A3>: P3 {\n associatedtype A3: P1\n}\n\npublic protocol P5<A3>: P4 {... | dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\rdar106820674.swift | rdar106820674.swift | Swift | 848 | 0.8 | 0.025 | 0.033333 | react-lib | 380 | 2024-06-07T17:52:20.702900 | MIT | true | 1fbfc1503d9ce64667b923baf436b949 |
// RUN: %target-swift-frontend -emit-ir %s\n\npublic protocol P {}\n\npublic protocol Q {\n associatedtype A: P\n}\n\npublic func f<T: P>(_: T) {}\n\npublic func foo1<each T: Q, each U>(t: repeat each T, u: repeat each U)\n where repeat (each U) == (each T).A {\n repeat f(each u)\n}\n\npublic func foo2<each T: Q>(... | dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\rdar108319167.swift | rdar108319167.swift | Swift | 368 | 0.8 | 0 | 0.076923 | react-lib | 433 | 2024-02-03T05:06:05.030844 | MIT | true | bc8b04437e3a9489a7f70604feb105df |
// RUN: %target-swift-frontend -emit-ir %s -disable-availability-checking\n\nstruct ZipCollection<each C: Collection> {\n let c: (repeat each C)\n}\n\nextension ZipCollection: Collection {\n struct Element {\n var elt: (repeat (each C).Element)\n }\n\n struct Index {\n let i: (repeat (each C).Index)\n }\n\n ... | dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\rdar110363503.swift | rdar110363503.swift | Swift | 1,225 | 0.8 | 0.074074 | 0.022222 | react-lib | 823 | 2024-06-07T23:39:49.458216 | Apache-2.0 | true | 3ffba34b3595742ba5c5b75f53ab96de |
// RUN: not %target-swift-frontend -typecheck %s\n\n// This code is invalid, but we shouldn't crash.\n\nstruct SyntaxCollectionIterator<E: SyntaxProtocol>: IteratorProtocol {\n typealias Element = E\n}\n\nprotocol SyntaxCollection: BidirectionalCollection {}\n\nextension SyntaxCollection {\n typealias Iterator = Synt... | dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\rdar110806272.swift | rdar110806272.swift | Swift | 416 | 0.8 | 0 | 0.166667 | node-utils | 34 | 2024-05-14T03:02:29.790338 | BSD-3-Clause | true | bcd4adafc6775e59ba81f20552c303b0 |
// RUN: not %target-swift-frontend -typecheck %s\n\nprotocol Box<Content> {\n associatedtype Content\n var value: Content {get set}\n}\nextension Box where Self == _Box {\n init(_ v: Content) {\n self.init(value: v)\n }\n}\n\nstruct _Box<Content> {\n var value: Content\n init(value: Content) {\n self.value ... | dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\rdar111991454.swift | rdar111991454.swift | Swift | 319 | 0.8 | 0 | 0.0625 | node-utils | 476 | 2025-03-01T10:11:55.291401 | GPL-3.0 | true | 1631ec5e5a2f0360b14d80f53604f10a |
// RUN: %target-swift-frontend -emit-ir %s\n\npublic func test<each T: BinaryInteger>(_ values: repeat each T) {\n var values = (repeat UInt32(truncatingIfNeeded: each values))\n withUnsafePointer(to: &values) { ptr in\n _ = ptr[0]\n }\n}\n | dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\rdar112065340.swift | rdar112065340.swift | Swift | 248 | 0.8 | 0 | 0.142857 | react-lib | 62 | 2023-11-22T17:54:33.852845 | GPL-3.0 | true | 320d830bb423c5c6d5f5fc55369ef918 |
// RUN: %target-swift-frontend -emit-ir %s -disable-availability-checking\n\npublic protocol P {\n associatedtype A\n}\n\npublic struct G<each T> {}\n\npublic protocol Q {\n init()\n}\n\npublic struct S<T: P, each U: P>: Q where repeat T.A == G<repeat (each U).A> {\n public init() {}\n public init(predicate: repeat... | dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\rdar112108253.swift | rdar112108253.swift | Swift | 321 | 0.8 | 0 | 0.083333 | node-utils | 316 | 2024-12-23T02:18:44.055246 | Apache-2.0 | true | 49c744f577fbddafa9da8bb33b9e38d3 |
// RUN: %target-swift-frontend -emit-ir %s -disable-availability-checking\n\nprotocol SomeObjectProtocol {}\n\nstruct SomeObject: SomeObjectProtocol {}\n\nprotocol ObjectProviding {\n associatedtype Object: SomeObjectProtocol\n var object: Object { get }\n}\n\nstruct ConformingObject<each B>: ObjectProviding {\n ... | dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\rdar113463759.swift | rdar113463759.swift | Swift | 378 | 0.8 | 0 | 0.083333 | awesome-app | 217 | 2025-04-03T13:09:04.119546 | MIT | true | dfa46ce4dbc242a1141e486e9bcf0af5 |
// RUN: %target-swift-frontend -emit-ir %s -disable-availability-checking\n\npublic protocol SomeObject {}\n\npublic struct VariadicObjectBox<each S: SomeObject> {\n public let object: (repeat each S)\n}\n\n@resultBuilder\npublic struct VariadicObjectBoxBuilder {\n public static func buildBlock<each S: SomeObject... | dataset_sample\swift\apple_swift\validation-test\compiler_crashers_2_fixed\rdar113492450.swift | rdar113492450.swift | Swift | 759 | 0.8 | 0 | 0.157895 | python-kit | 61 | 2024-04-06T16:48:10.152447 | BSD-3-Clause | true | 6e97b1d5c720ab3e0abd7404834e62b3 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.