Files
swift-mirror/validation-test/compiler_crashers_2_fixed/0174-rdar44770297.swift
Pavel Yaskevich bd527c114e [CSBindings] Don't consider dependent member types even if they are wrapped in optionals
Because binding producer is going to attempt to unwrap optionals
and try the type, which would lead to infinite recursion because
dependent member types aren't bindable.

Resolves: rdar://problem/44770297
2018-09-25 20:59:58 -07:00

12 lines
180 B
Swift

// RUN: not %target-swift-frontend -typecheck %s
protocol P {
associatedtype A
}
func foo<T: P>(_: () throws -> T) -> T.A? {
fatalError()
}
_ = foo() { fatalError() } & nil