Description
Take:
struct h<t>{
t f;
}
typedef h<bit> tt;
typedef h<tt> t;
This produces:
In file: /home/apinski/src/p4/p4c/ir/visitor.h:351
Compiler Bug: IR loop detected
If instead of the two typedefs you do:
typedef h<h<bit>> t1;
You get:
header.p4(5): [--Werror=type-error] error: h: recursive type specialization
typedef h<h<bit>> t1;
^
But I don't see how this is not allowed even with the approved section in the last language design meeting.