conversations listlengths 2 3 | source stringclasses 1
value | stack stringclasses 1
value |
|---|---|---|
[
{
"from": "human",
"value": "Add Array shim to cover compactMap in swift < 4.1\n"
},
{
"from": "gpt",
"value": "//\n// Array+Shims.swift\n// Moya-ModelMapper\n//\n// Created by Lukasz Mroz on 21.04.2018.\n//\n\n#if swift(>=4.1)\n#else\nextension Collection {\n func compactMap<ElementOfResu... | swift | chosen |
[
{
"from": "system",
"value": "UIKit: Set title for a UIButton\n"
},
{
"from": "human",
"value": "// Playground: UIKit\nimport UIKit\n\n/**\n==== UIView ====\n*/\nvar v = UIView(frame: CGRectMake(0,0, 200,200))\n\n/** \n==== Button ====\n*/\nvar b = UIButton(frame: CGRectMake(0,0,100,30))"
},
... | swift | chosen |
[
{
"from": "human",
"value": "Add system tests from KeyboardKitSwiftUI\n"
},
{
"from": "gpt",
"value": "//\n// SystemKeyboardButtonTests.swift\n// KeyboardKitTests\n//\n// Created by Daniel Saidi on 2020-07-02.\n// Copyright Β© 2020 Daniel Saidi. All rights reserved.\n//\n\nimport Quick\nimpor... | swift | chosen |
[
{
"from": "human",
"value": "Add test for arrays of location\n\ngit-svn-id: 47705994653588c662f4ea400dfe88107361c0e2@8699 dc4e9af1-7f46-4ead-bba6-71afc04862de\n"
},
{
"from": "gpt",
"value": "import io;\nimport location;\n\nmain {\n location A[];\n foreach i in [1:10] {\n A[i] = random_work... | swift | chosen |
[
{
"from": "human",
"value": "Add crash for missing OptionSetType memberwise init\n"
},
{
"from": "gpt",
"value": "// Distributed under the terms of the MIT license\n// Test case submitted to project by https://github.com/natecook1000 (Nate Cook)\n\nstruct A: OptionSetType {\n let rawValue = 0... | swift | chosen |
[
{
"from": "human",
"value": "[TypeChecker] NFC: Add a test-case for rdar://88256059\n"
},
{
"from": "gpt",
"value": "// RUN: %target-typecheck-verify-swift -target %target-cpu-apple-macosx10.15 -swift-version 5\n// REQUIRES: objc_interop\n// REQUIRES: OS=macosx\n\nimport SwiftUI\n\nstruct MyView... | swift | chosen |
[
{
"from": "human",
"value": "Add regression test for a bug that's already been fixed\n"
},
{
"from": "gpt",
"value": "// RUN: %target-swift-frontend %s -emit-ir\n\nenum Term<S> where S: Sequence, S.Iterator.Element == Term {\n case Cons(head: String, tail: S)\n}\n\nfunc produce<S>(s: S) -> Te... | swift | chosen |
[
{
"from": "human",
"value": "[SourceKit] Add test case for crash triggered in swift::TypeChecker::computeDefaultAccessibility(swift::ExtensionDecl*)\n\nStack trace:\n\n```\nfound code completion token A at offset 176\nswift-ide-test: /path/to/swift/include/swift/AST/Decl.h:1572: void swift::ExtensionDecl::s... | swift | chosen |
[
{
"from": "human",
"value": "Add a test that we don't crash when someone imports \"Swift\" instead of \"swift\".\n\nWe still get things pretty wrong when the wrong module is found because\nof a case-insensitive filesystem, but we can deal with that later.\n\n<rdar://problem/15632996>\n\nSwift SVN r12608\n"
... | swift | chosen |
[
{
"from": "human",
"value": "Move save action into another extension.\n"
},
{
"from": "gpt",
"value": "//\n// LTVPNConfigViewController+Save.swift\n// VPNOn\n//\n// Created by Lex on 1/23/15.\n// Copyright (c) 2015 LexTang.com. All rights reserved.\n//\n\nimport UIKit\nimport VPNOnKit\n\next... | swift | chosen |
[
{
"from": "human",
"value": "[SymbolGraph] Add additional filtering test NFC\n\nAdds an additional test case to make sure relationships are also filtered out\nwhen checking if extended types are \"implicitly private\". NFC.\n\nrdar://61843516\n"
},
{
"from": "gpt",
"value": "// RUN: %empty-direc... | swift | chosen |
[
{
"from": "human",
"value": "Add regression test for fixed crasher\n"
},
{
"from": "gpt",
"value": "// RUN: not %target-swift-frontend -typecheck %s\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:... | swift | chosen |
[
{
"from": "human",
"value": "[swiftc] Add test case for crash triggered in swift::ArchetypeBuilder::finalize(swift::SourceLoc)\n\nStack trace:\n\n```\nswift: /path/to/swift/lib/AST/ArchetypeBuilder.cpp:1683: swift::Identifier typoCorrectNestedType(ArchetypeBuilder::PotentialArchetype *): Assertion `dist > 0... | swift | chosen |
[
{
"from": "human",
"value": "Add TF-1232 negative test: proper mangling for AutoDiff-generated declarations.\n\nIRGenDebugInfo crash due to lack of proper mangling for AutoDiff-generated\ndeclarations: linear map structs and branching trace enums.\n"
},
{
"from": "gpt",
"value": "// RUN: not %ta... | swift | chosen |
[
{
"from": "human",
"value": "Add π₯ (π’ β 52, π β 5107) in swift::TypeBase::gatherAllSubstitutions(β¦)\n\nAdd test case for crash triggered in `swift::TypeBase::gatherAllSubstitutions(β¦)`.\n\n<details>\n<summary>Stack trace:</summary>\n```\n6 swift 0x00000000032b06dd llvm::llvm_unreachable_intern... | swift | chosen |
[
{
"from": "human",
"value": "Add protocol for start and stop refreshing functionality\n"
},
{
"from": "gpt",
"value": "//\n// Refreshable.swift\n// ZamzamUI\n//\n// Created by Basem Emara on 2020-06-01.\n// Copyright Β© 2020 Zamzam Inc. All rights reserved.\n//\n\n/// Exposes refresh start an... | swift | chosen |
[
{
"from": "human",
"value": "[test] Split out interpreter part of autolinking test.\n\nSwift SVN r14362\n"
},
{
"from": "gpt",
"value": "// RUN: rm -rf %t\n// RUN: mkdir %t\n// RUN: %swift -emit-module -parse-stdlib -o %t -module-name someModule -module-link-name module %S/../Inputs/empty.swift\... | swift | chosen |
[
{
"from": "human",
"value": "[swiftc] Add test case for crash triggered in swift::constraints::ConstraintSystem::diagnoseFailureForExpr(swift::Expr*)\n\nStack trace:\n\n```\n6 swift 0x00000000030e89fd llvm::llvm_unreachable_internal(char const*, char const*, unsigned int) + 461\n14 swift ... | swift | chosen |
[
{
"from": "human",
"value": "Add extension for color highlighting occurrences of substring.\n"
},
{
"from": "gpt",
"value": "import Foundation\n\nextension NSMutableAttributedString {\n\n /// Highlight occurrences of substring\n /// - Parameters:\n /// - text: the text to highlight\n ... | swift | chosen |
[
{
"from": "system",
"value": "Update test for debug info change.\n\nThis should fix the release+assert+no-opt-stdlib bot.\n\nSwift SVN r22531\n"
},
{
"from": "human",
"value": "// RUN: %swift -O -g %s -emit-sil | FileCheck %s -check-prefix=CHECK-SIL\n// RUN: %swift -O -g %s -sil-serialize-all -e... | swift | chosen |
[
{
"from": "system",
"value": "Test that Branches produces a type.\n"
},
{
"from": "human",
"value": "// Copyright Β© 2015 Rob Rix. All rights reserved.\n\nfinal class TagTests: XCTestCase {\n\tfunc testTagTypechecksAsFunction() {\n\t\tlet expected = Expression.FunctionType([ Term(\"Enumeration\"... | swift | chosen |
[
{
"from": "human",
"value": "Add search bar style extensions\n"
},
{
"from": "gpt",
"value": "//\n// UISearchBar_Style.swift\n// iExtra\n//\n// Created by Daniel Saidi on 2017-02-13.\n// Copyright Β© 2016 Daniel Saidi. All rights reserved.\n//\n\nimport UIKit\n\npublic extension UISearchBar {... | swift | chosen |
[
{
"from": "human",
"value": "[CodeCompletion] Add test case for SR-14711\n\nThe issue has been fixed on `main` recently. Since we have a reproducing test case, add it to the test suite.\n"
},
{
"from": "gpt",
"value": "// RUN: %swift-ide-test --code-completion --source-filename %s --code-complet... | swift | chosen |
[
{
"from": "human",
"value": "Add crashing test case from SR-5546.\n"
},
{
"from": "gpt",
"value": "// RUN: not --crash %target-swift-frontend %s -typecheck\npublic struct Foo<A, B, C> {}\n\npublic protocol P {\n associatedtype PA\n associatedtype PB = Never\n associatedtype PC = Never\n... | swift | chosen |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.