// RUN: mlir-opt %s -split-input-file -verify-diagnostics | FileCheck %s //===----------------------------------------------------------------------===// // Test mixed normal and variadic results //===----------------------------------------------------------------------===// func.func @correct_variadic_result() -> tensor { // CHECK: mixed_normal_variadic_result %0:5 = "test.mixed_normal_variadic_result"() : () -> (tensor, tensor, tensor, tensor, tensor) return %0#4 : tensor } // ----- func.func @error_in_first_variadic_result() -> tensor { // expected-error @+1 {{result #1 must be variadic of tensor of any type}} %0:5 = "test.mixed_normal_variadic_result"() : () -> (tensor, f32, tensor, tensor, tensor) return %0#4 : tensor } // ----- func.func @error_in_normal_result() -> tensor { // expected-error @+1 {{result #2 must be tensor of any type}} %0:5 = "test.mixed_normal_variadic_result"() : () -> (tensor, tensor, f32, tensor, tensor) return %0#4 : tensor } // ----- func.func @error_in_second_variadic_result() -> tensor { // expected-error @+1 {{result #3 must be variadic of tensor of any type}} %0:5 = "test.mixed_normal_variadic_result"() : () -> (tensor, tensor, tensor, f32, tensor) return %0#4 : tensor }