1 // RUN: mlir-opt %s --irdl-file=%S/cyclic-types.irdl.mlir -split-input-file -verify-diagnostics | FileCheck %s
3 // Types that have cyclic references.
5 // CHECK: !testd.self_referencing<i32>
6 func.func @no_references(%v: !testd.self_referencing<i32>) {
12 // CHECK: !testd.self_referencing<!testd.self_referencing<i32>>
13 func.func @one_reference(%v: !testd.self_referencing<!testd.self_referencing<i32>>) {
19 // expected-error@+1 {{'i64' does not satisfy the constraint}}
20 func.func @wrong_parameter(%v: !testd.self_referencing<i64>) {
26 // CHECK: !testd.type1<i32>
27 func.func @type1_no_references(%v: !testd.type1<i32>) {
33 // CHECK: !testd.type1<!testd.type2<i32>>
34 func.func @type1_one_references(%v: !testd.type1<!testd.type2<i32>>) {
40 // CHECK: !testd.type1<!testd.type2<!testd.type1<i32>>>
41 func.func @type1_two_references(%v: !testd.type1<!testd.type2<!testd.type1<i32>>>) {
47 // expected-error@+1 {{'i64' does not satisfy the constraint}}
48 func.func @wrong_parameter_type1(%v: !testd.type1<i64>) {
54 // expected-error@+1 {{'i64' does not satisfy the constraint}}
55 func.func @wrong_parameter_type2(%v: !testd.type2<i64>) {