Files
swift-mirror/test/SILOptimizer/definite_init_extension.swift
Michael Gottesman f10b45b540 [ownership] Add an extra run of -Onone tests with diagnostics with -enable-ownership-stripping-after-serialization enabled.
Right now the stdlib/overlays can compile against -Onone tests with or without
-enable-ownership-stripping-after-serialization. This will help me to prevent
other work going on from breaking these properties.
2019-10-26 15:12:14 -07:00

18 lines
465 B
Swift

// RUN: %target-swift-frontend -emit-sil -verify %s -o /dev/null
// RUN: %target-swift-frontend -emit-sil -verify %s -o /dev/null -enable-ownership-stripping-after-serialization
struct S<T> {
let t: T // expected-note {{'self.t.1' not initialized}}
}
extension S where T == (Int, String) {
init(x: ()) {
t.0 = 1
t.1 = "hi"
}
init(y: ()) {
t.0 = 1
} // expected-error {{return from initializer without initializing all stored properties}}
}