Files
swift-mirror/test/IRGen/dependent_generic_base_class_constraint.swift
Joe Groff 94a21ced5d IRGen: Work around crash lowering generic base class-constrained type parameter.
Type lowering a type with abstract type parameters requires a generic signature, but type lowering does not ever affect class types, so we can be unprincipled and bypass the problem. Work around for rdar://problem/24590570.
2016-02-10 12:55:21 -08:00

13 lines
222 B
Swift

// RUN: %target-swift-frontend -emit-ir -verify %s
class GenericClass<T> { }
protocol MyProtocol { }
class MyClass {
func myFunction<T, O: GenericClass<T> where T: MyProtocol>(myArg: O) -> T {
fatalError()
}
}