mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
A parse-only option is needed for parse performance tracking and the current option also includes semantic analysis.
14 lines
314 B
Swift
14 lines
314 B
Swift
// RUN: %target-typecheck-verify-swift -swift-version 3
|
|
|
|
// Swift 3 used default literal types even for normal protocol constraints,
|
|
// which led to nonsensical type inference behavior.
|
|
|
|
func f<T: ExpressibleByIntegerLiteral>(_: T = 0) { }
|
|
f()
|
|
|
|
struct X<T: ExpressibleByIntegerLiteral> {
|
|
func g() { }
|
|
}
|
|
|
|
X().g()
|