Files
swift-mirror/validation-test/compiler_crashers_fixed/27194-swift-pattern-foreachvariable.swift
Jacob Bandes-Storch 61dea21228 Fix crash in DependentGenericTypeResolver::resolveDependentMemberType
An erroneous `baseTy` would cause resolveArchetype to return nullptr, resulting in a null dereference.
2015-12-10 14:52:53 -08:00

237 lines
2.0 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
{
{
a {{
{{
( { {
{
{
{{:a
}}}let a{{
{
{ {d b{}}}}}b}}}}}}<T}}}class S<T{func a<h{func b<T where h.g=a
{
func a{
if true{
}
struct d<T where g
func
{init(
{ (( (( )
let f=A{
[:e
}}}protocol P{
{
let g{
{
[{A
{
{
func a{func {
{{
func x:
{ {
{{{
a{
struct d<T where g{
{
{ {
"
{ {
[ { ()a{let v:
{ (
{ (
a{
{protocol P{
"class c
{
if true{
{{
{
if true{
struct B<T where I:a{
"
{ {g:{(){
{
let v:d<T where I:a=g
[{func{ {d b{}}}}}b}}}}}}<T}}}class S<T{func a<h{func b<T where h.g=a
{
}let a<T where T{{
typealias b:a{{T:
{
func a{struct S<b{
struct d
{
func a{
a{g=F
func x:
{
{
{d b{}}}}}b}}}}}}<T}}}class S<T{func a<h{func b<T where h.g=a
class d<T where I:
[:a{
let(
{
func a{
{
a{
a{{let t=0
class b:C{
a typealias b:Int=i{
{ {struct B{
"
{
let h{{class c{func x
typealias F
{
{
}protocol a
var b:a{(
"class b{
protocol P{
{
}struct d
{
{{}}}}protocol P{{
{ :a{
{ {
{
func{ a{init()a{
{ (
{g
{{
{ (
{
protocol A{
{
{
{ {{
typealias e:a{
{{
"
{
{{
{ {struct d<b:
d
let v:a
{
{
if true{
{
{typealias e{
func f{
{ {
func a{protocol P{{T:
var b{typealias e{
{ a{typealias b{let a{
func a<b{{
[{
{protocol P{
a typealias b:a=F
{
{
{
if true{
let f{{
(({
{
{}let g{
protocol a<T where g{let h{{
""
{let h{{struct d<T where g
struct S
{( ){let t:
var b{
{ {
protocol{{
protocol P{
{
{
{ {
func
}}protocol A{{
let v:e
{
{ {protocol b:
{
{
struct S<T where T:a<b:
{
a typealias e{
{
{
{
{{typealias f{let v:(()
{:C{{{
{
{{{{
func a{
{
{
func a
{}}}enum S<b{
{
( : ( )
{( : ( : ( : ( { {
struct d
{
{
{
"
protocol P{
class b{((
a {
{
((x
{{
{typealias e
}
{{
{
{
[{
a {{
{ :d= .c{
{e a{}
}}}
{{
{ ({{func b{func a
[{(
(){A<T:
{ {:a{
{
{
{
[ { {
{
d
{ ({func x
{{:
class A<T where I:a{A{
{{A
{
{{
func a{{let t:C{
[ {
{
struct Q{
class b{func a{
class A
{
{{
{{func
{
{{let v:a
struct d<T where I:e:
struct d<h}}}protocol A<h{}enum S
let t=F=g:a{let a{
{(
:
{ {
let a{