mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Add 5 compiler crashes (+ 1 fixed crash).
This commit is contained in:
2606
validation-test/compiler_crashers/24797-no-stacktrace.swift
Normal file
2606
validation-test/compiler_crashers/24797-no-stacktrace.swift
Normal file
File diff suppressed because it is too large
Load Diff
1307
validation-test/compiler_crashers/24798-no-stacktrace.swift
Normal file
1307
validation-test/compiler_crashers/24798-no-stacktrace.swift
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,11 @@
|
||||
// RUN: not --crash %target-swift-frontend %s -parse
|
||||
|
||||
// Distributed under the terms of the MIT license
|
||||
// Test case submitted to project by https://github.com/zneak (zneak)
|
||||
|
||||
protocol A { typealias B }
|
||||
class C : A { typealias B = Int }
|
||||
|
||||
func crash<D: C>() -> Bool {
|
||||
let a: D.B? = nil
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
// RUN: not --crash %target-swift-frontend %s -parse
|
||||
|
||||
// Distributed under the terms of the MIT license
|
||||
// Test case submitted to project by https://github.com/austinzheng (Austin Zheng)
|
||||
|
||||
enum A<T> {
|
||||
case Just(T)
|
||||
case Error
|
||||
}
|
||||
|
||||
func foo() -> A<(String, String?)> {
|
||||
return A.Just("abc", "def")
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
// RUN: not --crash %target-swift-frontend %s -parse
|
||||
// REQUIRES: objc_interop
|
||||
|
||||
// Distributed under the terms of the MIT license
|
||||
// Test case found by https://github.com/benshan (Ben Shanfelder)
|
||||
|
||||
import Foundation
|
||||
|
||||
extension NSObject {
|
||||
var handler: Int {
|
||||
// FIXME: Crashing due to lack of get {}
|
||||
set {}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
// RUN: not %target-swift-frontend %s -parse
|
||||
|
||||
// rdar://22007370
|
||||
|
||||
class Foo {
|
||||
subscript(key: String) -> String {
|
||||
get { a }
|
||||
set { b }
|
||||
}
|
||||
|
||||
subscript(key: String) -> String {
|
||||
get { a }
|
||||
set { b }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user