blob: 72669912e592a46d30327fb34311df45eabddc2f [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 // expected-note {{change 'let' to 'var' to make it mutable}}
init() {
self.x = 12
super.init(x: &x) // expected-error {{immutable value 'self.x' must not be passed inout}}
}
}