Files
swift-mirror/validation-test/compiler_crashers
Slava Pestov aaca0badf9 Sema: Diagnose invalid references to type alias members of unbound generic types
Consider the following setup:

struct GenericStruct<T> {
  typealias Dependent = T
  typealias Concrete = Int
}

We have no way to model 'GenericStruct.Dependent' in the AST, so the
reference would crash. Instead, produce a diagnostic suggesting to
insert generic parameters, like 'GenericStruct<Int>.Dependent'.

The reference 'GenericStruct.Concrete' is fine though, and should
not crash; add a test that it works.

Fixes <https://bugs.swift.org/browse/SR-4390>, <rdar://problem/31480755>.
2017-04-23 00:02:30 -07:00
..

// 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

Repository: https://github.com/practicalswift/swift-compiler-crashes.git
Web URL: https://github.com/practicalswift/swift-compiler-crashes