Files
swift-mirror/test/SIL/verifier-init-existential.sil
Joe Groff c0a2994564 AST: Start printing function types with @convention instead of old attributes.
And update tests to match.

Swift SVN r27262
2015-04-13 22:51:34 +00:00

18 lines
458 B
Plaintext

// RUN: %target-sil-opt %s -verify
// REQUIRES: asserts
sil_stage canonical
protocol Proto {
}
sil @test : $@convention(thin) (@out protocol<>, @in Proto) -> () {
bb0(%0 : $*protocol<>, %1 : $*Proto):
// init_existential_addr should be able to put an existential container inside an existential container
%2 = init_existential_addr %0 : $*protocol<>, $Proto
copy_addr [take] %1 to [initialization] %2 : $*Proto
%4 = tuple ()
return %4 : $()
}