func @constant_out_of_range() {
^bb:
- %x = "std.constant"(){value: 100} : () -> i1 // expected-error {{requires attribute's type (i64) to match op's return type (i1)}}
+ %x = "std.constant"(){value: 100} : () -> i1 // expected-error {{requires attribute's type ('i64') to match op's return type ('i1')}}
return
}
func @constant_wrong_type() {
^bb:
- %x = "std.constant"(){value: 10.} : () -> f32 // expected-error {{requires attribute's type (f64) to match op's return type (f32)}}
+ %x = "std.constant"(){value: 10.} : () -> f32 // expected-error {{requires attribute's type ('f64') to match op's return type ('f32')}}
return
}
func @return_type_mismatch() -> i32 {
%0 = "foo"() : ()->f32
- return %0 : f32 // expected-error {{type of return operand 0 (f32) doesn't match function result type (i32)}}
+ return %0 : f32 // expected-error {{type of return operand 0 ('f32') doesn't match function result type ('i32')}}
}
// -----