mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
This would just set the NominalTypeDecl's declared type to ErrorType, which caused problems elsewhere. Instead, generalize the logic used for AbstractFunctionDecl. This correctly wires up the GenericTypeParamDecl's archetypes even if the signature didn't validate, fixing crashes if the generic parameters of the type are referenced.
164 lines
2.3 KiB
Swift
164 lines
2.3 KiB
Swift
// RUN: not %target-swift-frontend %s -parse
|
|
|
|
// Distributed under the terms of the MIT license
|
|
// Test case submitted to project by https://github.com/practicalswift (practicalswift)
|
|
// Test case found by fuzzing
|
|
|
|
struct c<h:d
|
|
class A:BooleanType}{class B<T where k:c<I : {
|
|
struct B:BooleanType}}enum S<T where g: Int = Swift.c {
|
|
let a {
|
|
class n{
|
|
var f=[1)let v: p
|
|
struct c:T: AnyObject.e :d{
|
|
var _=e:
|
|
struct B : e:
|
|
{
|
|
class B:d
|
|
struct Q{{
|
|
let :BooleanType}
|
|
class B<T where H:A
|
|
class A{
|
|
}
|
|
let , i {
|
|
class c:A{
|
|
class B<T
|
|
}
|
|
struct b{return"
|
|
struct b{
|
|
}
|
|
import CoreData
|
|
enum b<T where h:a
|
|
struct B<I : {
|
|
struct Q{
|
|
struct b{
|
|
}
|
|
struct A {{
|
|
class n{
|
|
var d func b<I :A<T where h: C {
|
|
}
|
|
{:
|
|
struct S<f=[1){
|
|
class B<T where H:BooleanType}class c<T {
|
|
func b{() {return"
|
|
func a<T where T: b { func a{
|
|
struct S<T where H : C {
|
|
{class
|
|
let a {:A{
|
|
let , i {class
|
|
struct A{}
|
|
func a:a{
|
|
class b<T where h: a{return"
|
|
struct c<T where h: p
|
|
class B<T where H:A{
|
|
[[]deinit{return"
|
|
struct B{
|
|
struct c:d{typealias f=e:A
|
|
class A:A{{
|
|
let a<T where T
|
|
}}
|
|
let f: e .c {
|
|
extension String {class d=e
|
|
}}
|
|
"[1
|
|
let v: b<T where h: c<T where k:a{{return"
|
|
}
|
|
class B<T where H:
|
|
let f: {}
|
|
class A{
|
|
(("
|
|
}
|
|
struct B
|
|
func b<T where g:AnyObject.c {struct S<T where T
|
|
{
|
|
struct Q{
|
|
struct c<T where h:A{
|
|
class B{
|
|
let f: {}enum a {
|
|
let c {
|
|
class b<T where h: AnyObject.c {
|
|
var f=e:A
|
|
struct D{
|
|
let d: B? = b
|
|
protocol c
|
|
enum B<d = "
|
|
import CoreData
|
|
enum b{func g: {
|
|
func b<T {
|
|
{
|
|
struct B : b<T where h:A{
|
|
protocol A {
|
|
import CoreData
|
|
var _=a{struct A:
|
|
class B<T where T{
|
|
}
|
|
}
|
|
let v: b
|
|
{{let f: e .T
|
|
let f: e = A:
|
|
}
|
|
e = A{
|
|
class A{
|
|
if true {
|
|
let a {
|
|
class C
|
|
var _=a{{class b{
|
|
func b
|
|
struct b{return""
|
|
var d = A{
|
|
}
|
|
struct S<I :A{
|
|
func g: C {
|
|
let start = true {
|
|
struct S<T where H:
|
|
func u([Void{{
|
|
class A{init(((i
|
|
let c {
|
|
{
|
|
struct Q{
|
|
class B<T where h:d<T where h:d<
|
|
func b{
|
|
{class
|
|
""[enum A<T w gb
|
|
struct c{
|
|
Void{{}
|
|
}
|
|
}enum b{
|
|
protocol A {{
|
|
class B<T where B<T where T{}
|
|
class B<T where T: C {
|
|
protocol A {var d = "[enum b<T where B{
|
|
var f: p
|
|
"
|
|
}
|
|
protocol c<T where B{
|
|
func u((e .Element
|
|
}
|
|
let start = A<T where g: d where k:a{var d{
|
|
struct b{
|
|
}
|
|
struct d
|
|
{struct b<T where h:A
|
|
func a{
|
|
}
|
|
}struct A<T where h:
|
|
}(i
|
|
class b<T where B
|
|
let
|
|
case c
|
|
struct b<T {
|
|
struct c{return"[1)let , i {
|
|
(i
|
|
class B:a:A
|
|
let a {return"[[[Void{
|
|
enum b{
|
|
let d<T where h:
|
|
e :c{
|
|
enum a {
|
|
var f: c<T where h:d: AnyObject.T
|
|
}
|
|
var = "[Void{
|
|
let a {
|
|
enum a {{
|
|
class
|