Files
swift-mirror/validation-test/compiler_crashers_2_fixed/0008-rdar18796397.swift
Doug Gregor e4f2cef6f7 Eliminate archetypes from interface types.
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
2015-05-02 05:28:57 +00:00

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>()