mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
A parse-only option is needed for parse performance tracking and the current option also includes semantic analysis.
24 lines
418 B
Swift
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)
|