Files
swift-mirror/validation-test/compiler_crashers_2_fixed/0176-sr-8094.swift
Doug Gregor 83e41daaa6 [AST] Ill-formed @objc protocols might have associated types.
As an optimization, we don't even look for associated types in @objc
protocols. However, this could lead to broken invariants like "every
associated type has a witness" in ill-formed @objc protocols that do
have associated types.

Implement this optimization by checking whether the protocol has a
Clang node. Fixes rdar://problem/41425828 / SR-8094.
2018-10-06 10:35:07 -07:00

15 lines
230 B
Swift

// RUN: not %target-swift-frontend -typecheck %s
@objc protocol Foo {
associatedtype Bar
var property: Generic<Bar> { get }
}
class Generic<Element> {
}
class FooImpl<T>: NSObject, Foo {
let property: Generic<T>
}