Skip to content

Error message for checking of types inside header does not say what the specialization is location is #3170

Closed
@apinski-cavium

Description

Take:

header yy
{
  bit tt;
}
struct y
{
  yy[2] tt;
}
header t<tt>
{
  tt y;
}

typedef t ty;
typedef ty<y> tty;

Right now the compiler outputs:

t2.p4(11): [--Werror=type-error] error: Field 'y' of 'header t' cannot have type 'struct y'
  tt y;
     ^
t2.p4(5)
struct y
       ^

But it does not reference the last typedef line for the subsitution that had happened so it is not obvious where the problem is located.
I suspect this is an issue with most places of subsitutions too include functions.

Metadata

Assignees

Labels

enhancementThis topic discusses an improvement to existing compiler code.fixedThis topic is considered to be fixed.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions