Files
swift-mirror/validation-test/compiler_crashers_2_fixed/0121-rdar26498438.swift
Doug Gregor ef337bb8ba [Evaluator] Use the request-evaluator for the superclass of a class.
Wire up the request-evaluator with an instance in ASTContext, and
introduce two request kinds: one to retrieve the superclass of a class
declaration, and one to compute the type of an entry in the
inheritance clause.

Teach ClassDecl::getSuperclass() to go through the request-evaluator,
centralizing the logic to compute and extract the superclass
type.

Fixes the crasher from rdar://problem/26498438.
2018-06-14 15:28:36 -07:00

41 lines
446 B
Swift

// RUN: not %target-swift-frontend %s -typecheck
class C { }
protocol PI
{
init()
}
protocol MDS
{
associatedtype Index : PI
func f(_ : MVC<Index, Self>, atIndex index : Index) -> C?
}
class MVC<Index : PI, DataSource : MDS>: C where DataSource.Index == Index
{
}
struct LPI : PI
{
var x : Int
var y : Int
}
extension LPI
{
init()
{
x = 0
y = 0
}
}
class LPVC: MVC<LPI, LPVC>
{
}