Sign in
fuchsia
/
third_party
/
swift
/
ad82fe6c700ee1593e8c0b2db88075561c46d4c9
/
.
/
test
/
SILOptimizer
/
definite_init_inout_super_init.swift
blob: b8c8f18c980d34508b082cc665b282bf24d4c63e [
file
] [
log
] [
blame
]
// RUN: %target-swift-frontend -emit-sil -verify %s -o /dev/null
class
B
{
init
(
x
:
inout
Int
)
{}
}
class
A
:
B
{
let
x
:
Int
init
()
{
self
.
x
=
12
super
.
init
(
x
:
&
x
)
// expected-error {{immutable value 'self.x' must not be passed inout}}
}
}