Sign in
fuchsia
/
third_party
/
swift
/
f0b10427e3ec291ffd449ff18212ff36dda6ab50
/
.
/
test
/
TypeCoercion
/
constructor_return.swift
blob: a72398a2aef2698bfdcd34229e971ddce3036203 [
file
] [
log
] [
blame
]
// RUN: %target-typecheck-verify-swift
func foo
()
{}
func bar
()
{}
struct
S
{
init
(
b
:
Bool
)
{
foo
()
if
b
{
return
}
bar
()
}
}
class
C
{
var
b
:
Bool
init
(
b
:
Bool
)
{
self
.
b
=
b
foo
()
if
b
{
return
}
bar
()
}
deinit
{
foo
()
if
b
{
return
}
bar
()
}
}