mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
22 lines
360 B
Swift
22 lines
360 B
Swift
// RUN: %target-typecheck-verify-swift
|
|
|
|
struct A {}
|
|
struct B {}
|
|
|
|
func other() -> A {}
|
|
|
|
func takesB(_: B) {}
|
|
|
|
func multipleLocalResults1() {
|
|
func other() -> B {}
|
|
let result = other()
|
|
takesB(result)
|
|
}
|
|
|
|
func multipleLocalResults2() {
|
|
func other() -> B {}
|
|
let result = other()
|
|
takesB(result)
|
|
let other: Int = 123 // expected-warning {{never used}}
|
|
}
|