Files
swift-mirror/validation-test/compiler_crashers_2_fixed/0130-sr5013.swift
Pavel Yaskevich 11ba7e0f42 [CSSimplify] When trying to simplify bind with error type fail gracefully
Since member lookup doesn't check requirements
it might sometimes return types which are not
visible in the current context e.g. typealias
defined in constrained extension, substitution
of which might produce error type for base, so
assignement should thead lightly and just fail
if it encounters such types.

Resolves: rdar://problem/39931339
Resolves: SR-5013
2018-05-28 00:24:54 -07:00

13 lines
170 B
Swift

// RUN: not %target-swift-frontend -typecheck %s
protocol A {
associatedtype B
}
extension A {
func foo() {
(B.self as! Sequence.Type).Element
}
}