Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions validation-test/compiler_crashers_fixed/issue-46986.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// RUN: not %target-swift-frontend -typecheck %s

struct Foo : ExpressibleByUnicodeScalarLiteral {}
let _: Foo = "\\"
11 changes: 11 additions & 0 deletions validation-test/compiler_crashers_fixed/issue-47195.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// RUN: %target-swift-frontend -emit-ir %s

extension Dictionary {
init<S: Sequence>(grouping elements: S, by keyForValue: (S.Iterator.Element) -> Key)
where Value : RangeReplaceableCollection, Value.Iterator.Element == S.Iterator.Element {
self = [:]
}
}

let names = ["Patti", "Aretha", "Anita", "Gladys"]
print(Dictionary(grouping: names, by: { $0.utf16.count }))
17 changes: 17 additions & 0 deletions validation-test/compiler_crashers_fixed/issue-47769.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// RUN: not %target-swift-frontend -typecheck %s

struct _MyError: ExpressibleByIntegerLiteral {
typealias IntegerLiteralType = Int

private var _underlyingValue: _MyError.IntegerLiteralType
var httpErrorCode: UInt = 0

public init(integerLiteral value: _MyError.IntegerLiteralType) {
_underlyingValue = value
}
}

enum MyError: _MyError, Error {
typealias RawValue = Int
case caseOne = 0
}
17 changes: 17 additions & 0 deletions validation-test/compiler_crashers_fixed/issue-51794.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// RUN: %target-swift-frontend -emit-ir %s

protocol Prot {
var prop: String { get }
}

class Gen<A: Prot> { }

class Real: Gen<Real.RealProt> {
enum RealProt: Prot {
case first

var prop: String {
return "hello"
}
}
}
12 changes: 12 additions & 0 deletions validation-test/compiler_crashers_fixed/issue-52891.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// RUN: %target-swift-frontend -emit-ir %s
// REQUIRES: objc_interop

import Foundation

class C {
@objc func foo() -> String! { return nil }
}

func bar(_ x: AnyObject) {
let y: String = x.foo!()
}