Files
swift-mirror/test/Interpreter/dependent_reabstraction.swift
Doug Gregor 54979b70a7 Remove uses of complete-unnamed function parameters from the testsuite.
Support for "func f(Int)" is going away.

Swift SVN r29608
2015-06-24 16:01:37 +00:00

27 lines
370 B
Swift

// RUN: %target-run-simple-swift
// REQUIRES: executable_test
protocol A {
typealias B
func b(_: B)
}
struct X<Y> : A {
func b(b: X.Type) {
let x: Any = b
print(b as X.Type)
}
}
func foo<T: A>(x: T, _ y: T.B) {
x.b(y)
}
let a = X<Int>()
let b = X<String>()
// CHECK: (Metatype)
foo(a, X<Int>.self)
// CHECK-NEXT: (Metatype)
foo(b, X<String>.self)