Files
swift-mirror/test/decl/overload_swift4.swift
Huon Wilson 8dcad45d82 [Sema] "will be illegal" -> "will be an error" in diagnostics.
"illegal" is an overloaded word and can distress people who aren't familiar with
the usage as being illegal with respect to the language definition, not the
actual law.
2018-06-21 17:07:32 +10:00

20 lines
781 B
Swift

// RUN: %target-typecheck-verify-swift -swift-version 4
struct SR7251<T> {
struct j {} // expected-note {{previously declared here}}
static var k: Int { return 0 } // expected-note {{previously declared here}}
}
extension SR7251 {
static var i: Int { return 0 }
// expected-note@-1 {{previously declared here}}
// expected-note@-2 {{previously declared here}}
struct i {} // expected-warning {{redeclaration of 'i' is deprecated and will be an error in Swift 5}}
typealias i = Int // expected-warning {{redeclaration of 'i' is deprecated and will be an error in Swift 5}}
static var j: Int { return 0 } // expected-warning {{redeclaration of 'j' is deprecated and will be an error in Swift 5}}
struct k {} // expected-error{{invalid redeclaration of 'k'}}
}