mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
226 lines
2.1 KiB
Swift
226 lines
2.1 KiB
Swift
// This source file is part of the Swift.org open source project
|
|
// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
|
|
// Licensed under Apache License v2.0 with Runtime Library Exception
|
|
//
|
|
// See https://swift.org/LICENSE.txt for license information
|
|
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
|
|
|
|
// RUN: not %target-swift-frontend %s -typecheck
|
|
{
|
|
let a {
|
|
{
|
|
{
|
|
{{
|
|
{{{
|
|
typea
|
|
{
|
|
}typealias e:A<T:T {{{{
|
|
typealias B }
|
|
{struct A {()a{struct A
|
|
{let t:d
|
|
{
|
|
enum A { typealias B }}
|
|
class d
|
|
{
|
|
{-> : A{{{
|
|
}}
|
|
{
|
|
case,
|
|
{
|
|
{{
|
|
func c{{struct B? = Int }
|
|
var:a{
|
|
class A
|
|
class C<D: d
|
|
case,
|
|
{{
|
|
{
|
|
{{
|
|
class d
|
|
{
|
|
func c{{
|
|
}
|
|
{struct B? = nil
|
|
{
|
|
class d where h:e
|
|
func crash<T>:a{
|
|
}}typealias e{
|
|
{
|
|
^
|
|
let i}
|
|
{
|
|
{{
|
|
{
|
|
{
|
|
}}}}}}}}}}}
|
|
"
|
|
struct A {{
|
|
{e a{
|
|
{
|
|
{struct Q{
|
|
{
|
|
{{
|
|
{{struct B<H , f=1
|
|
class A<D: A
|
|
{{{
|
|
class A{{
|
|
{
|
|
}}typealias B }
|
|
{
|
|
}
|
|
"
|
|
{e a{func e{
|
|
{{
|
|
{let g{{{
|
|
^
|
|
{
|
|
for h:A
|
|
class A {
|
|
protocol d
|
|
{{
|
|
{
|
|
{()a{{
|
|
func a{{
|
|
class A {class a: D: C<H , f=1
|
|
{
|
|
{{
|
|
{
|
|
}protocol d
|
|
{
|
|
}}
|
|
enum A {struct A {{
|
|
func crash<d {let t:T {T> : C{
|
|
{
|
|
{{{
|
|
typea
|
|
}
|
|
var b{
|
|
{{
|
|
{{
|
|
typea
|
|
{{{{{
|
|
func c{
|
|
var d{
|
|
let a {ypealias F=i}
|
|
{
|
|
{{
|
|
protocol A c{
|
|
{
|
|
enum S{
|
|
let h:A<ere d
|
|
class A<T> : A {{g=1
|
|
func c{func a{A<T {
|
|
let h:e{{
|
|
case,
|
|
{{
|
|
{
|
|
{let a{{
|
|
{class a
|
|
{{
|
|
class a{ typealias e:a
|
|
{
|
|
{
|
|
{
|
|
func crash<T {
|
|
{
|
|
{
|
|
{{
|
|
{ypealias F=0A.c
|
|
{}}}}
|
|
{{
|
|
var b{{{
|
|
func c{
|
|
{{{let g{
|
|
{{
|
|
var f
|
|
typealias e
|
|
}
|
|
struct A
|
|
enum A { :{struct c:{
|
|
enum S<D.c{
|
|
struct A
|
|
protocol A { :a{
|
|
{
|
|
{func e:a{
|
|
{
|
|
{{
|
|
}
|
|
{
|
|
}
|
|
var b{
|
|
var b{struct B:A {{
|
|
{
|
|
{
|
|
enum A {A
|
|
}
|
|
{{
|
|
{
|
|
{ypealias F=0A.c:a{->:{
|
|
( "
|
|
{
|
|
{{
|
|
}}}}
|
|
{
|
|
{() ->{
|
|
class a {
|
|
{
|
|
{
|
|
class A {
|
|
{-> Bool {{
|
|
func crash<T {{{{{
|
|
{d b{}}}}}b}}}}}}<T}}}class S<T{func a<h{func b<T where h.g=a
|
|
{{g=i{}class C>{
|
|
{
|
|
{{struct A<T> Bool {
|
|
protocol A { typealias e{{
|
|
{
|
|
class A
|
|
class a {let h=i}}class a {let:a{
|
|
struct A<D: D.B? = Int }}}
|
|
{class A{
|
|
var:d
|
|
typea
|
|
s :A {
|
|
{
|
|
typea
|
|
class A{{
|
|
{
|
|
{
|
|
{
|
|
for}
|
|
{{let a {
|
|
class A{{
|
|
{
|
|
let<T al c:a{
|
|
{let a {
|
|
{
|
|
{()a{{()a
|
|
{{
|
|
class A
|
|
func c
|
|
{}
|
|
{
|
|
{
|
|
struct B<T:A {
|
|
{{
|
|
{
|
|
{{class a{T> Bool {ypealias F=c:d{{class A{class
|
|
{
|
|
let h:A{
|
|
var b{{{
|
|
func a{let c{{
|
|
{let<T
|
|
{
|
|
{{{let g=1
|
|
{
|
|
{
|
|
{{
|
|
func b {
|
|
protocol a{
|
|
class C>() ->:a{
|
|
class A{
|
|
typealias B }}}class a {{let h:a{{{
|
|
{
|
|
typealias d
|
|
{
|