mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
The culprit happened to be a type representation cloner for tuple type representations that didn't actually clone anything. Introduce an AST-level verifier that makes sure we catch any archetypes that slip into interface types earlier in the future. Fixes rdar://problem/18796397 and the three dupes I've found so far. Swift SVN r28080
21 lines
345 B
Swift
21 lines
345 B
Swift
// RUN: %target-swift-frontend %s -emit-ir -o /dev/null
|
|
public protocol OurProtocol {
|
|
|
|
typealias T
|
|
var myVar: T? {get set}
|
|
var validator: (Int) -> (T) { get set }
|
|
}
|
|
|
|
class Parent {
|
|
|
|
}
|
|
|
|
class MyClass<T> : OurProtocol {
|
|
var myVar: T?
|
|
var validator: (Int) -> (T) = { (var t) -> (T) in return t as! T }
|
|
|
|
}
|
|
|
|
|
|
var myClass = MyClass<Int>()
|