blob: 6884fb7bf7be56317fe5dc3f5bcb3558290ac65f [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 [ossa] @callFoo : $@convention(thin) (@owned Foo) -> () {
bb0(%0 : @owned $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 : $()
}