blob: 4ed416458b931d98c8de06e63cf53ce73c737050 [file] [log] [blame]
// RUN: %empty-directory(%t)
// RUN: %target-swift-frontend %S/Inputs/guaranteed-normal-args.swift -o %t/TestModule.swiftmodule -emit-module -disable-guaranteed-normal-arguments -module-name TestModule
// RUN: not --crash %target-sil-opt %s -disable-guaranteed-normal-arguments -I=%t
// This is a negative test
sil_stage canonical
import TestModule
sil @callFoo : $@convention(thin) (@owned Foo) -> () {
bb0(%0 : $Foo):
%1 = class_method %0 : $Foo, #Foo.doSomething!1 : (Foo) -> (Foo) -> (), $@convention(method) (@guaranteed Foo, @owned Foo) -> ()
destroy_value %0 : $Foo
%9999 = tuple()
return %9999 : $()
}