1 // RUN: mlir-opt %s --irdl-file=%S/test-type.irdl.mlir -split-input-file -verify-diagnostics | FileCheck %s
3 func.func @succeededTypeVerifier() {
4 // CHECK: "testd.any"() : () -> !testd.singleton
5 "testd.any"() : () -> !testd.singleton
7 // CHECK-NEXT: "testd.any"() : () -> !testd.parametrized<f32, i32>
8 "testd.any"() : () -> !testd.parametrized<f32, i32>
10 // CHECK: "testd.any"() : () -> !testd.parametrized<i1, i64>
11 "testd.any"() : () -> !testd.parametrized<i1, i64>
18 func.func @failedSingletonVerifier() {
19 // expected-error@+1 {{expected 0 type arguments, but had 1}}
20 "testd.any"() : () -> !testd.singleton<i32>
25 func.func @failedParametrizedVerifierWrongNumOfArgs() {
26 // expected-error@+1 {{expected 2 type arguments, but had 1}}
27 "testd.any"() : () -> !testd.parametrized<i32>
32 func.func @failedParametrizedVerifierWrongArgument() {
33 // expected-error@+1 {{'i1' does not satisfy the constraint}}
34 "testd.any"() : () -> !testd.parametrized<i32, i1>