2019-06-25 05:35:21 +08:00
|
|
|
// RUN: mlir-opt %s -split-input-file -verify-diagnostics | FileCheck %s
|
2019-06-04 05:52:56 +08:00
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// Test TypeArrayAttr
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
func @correct_type_array_attr_pass() {
|
|
|
|
// CHECK: test.type_array_attr
|
2019-06-26 10:06:06 +08:00
|
|
|
"test.type_array_attr"() {attr = [i32, f32]} : () -> ()
|
2019-06-04 05:52:56 +08:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// -----
|
|
|
|
|
|
|
|
func @non_type_in_type_array_attr_fail() {
|
|
|
|
// expected-error @+1 {{'attr' failed to satisfy constraint: type array attribute}}
|
2019-06-26 10:06:06 +08:00
|
|
|
"test.type_array_attr"() {attr = [i32, 5 : i64]} : () -> ()
|
2019-06-04 05:52:56 +08:00
|
|
|
return
|
|
|
|
}
|