Files
swift-mirror/test/Constraints/nested_generics.swift
David Farler b7d17b25ba Rename -parse flag to -typecheck
A parse-only option is needed for parse performance tracking and the
current option also includes semantic analysis.
2016-11-28 10:50:55 -08:00

24 lines
418 B
Swift

// RUN: %target-typecheck-verify-swift
struct G<T> {
init() {}
init<U>(x:G<U>) { }
func foo<U>(_ x: G<U>) { }
func bar<U>(_ x: U) { }
static func static_foo<U>(_ x: G<U>) { }
static func static_bar<U>(_ x: U) { }
}
typealias GInt = G<Int>
typealias GChar = G<UnicodeScalar>
GInt(x: GChar()) // expected-warning{{unused}}
GInt().foo(GChar())
GInt().bar(0)
GInt.static_foo(GChar())
GInt.static_bar(0)