Files
swift-mirror/test/Compatibility/default_literal_generic_args.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

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()