Files
swift-mirror/validation-test/compiler_crashers_fixed/28301-swift-constraints-constraintsystem-simplifyconstructionconstraint.swift
Slava Pestov e8abf54a9a Sema: Fixes for protocol typealiases
This is a big refactoring of resolveTypeInContext() which makes
the function clearer to understand by merging various special
cases and generalizing the logic for walking parent and superclass
contexts to cover more cases.

This improves typealiases in protocols a bit:

1) Previously a typealias in a protocol either had to be concrete,
   or consist of a single path of member types from Self, eg
   Self.A.B. Lift this restriction, so we can now write things like

protocol Fireworks {
  associatedtype Exploding
  typealias Exploder = Exploding -> [Exploding]
}

2) Protocol typealiases can now be accessed via qualified lookup
   on concrete types. Getting this working for unqualified lookup
   requires further refactorings which will be in a subsequent
   patch.
2016-06-11 16:24:14 -07:00

10 lines
442 B
Swift

// This source file is part of the Swift.org open source project
// Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See http://swift.org/LICENSE.txt for license information
// See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
// RUN: not %target-swift-frontend %s -parse
class n{var d={}class A typealias d<T>:A let a=d{