Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error message for already specialized type is misleading #3172

Closed
apinski-cavium opened this issue Apr 4, 2022 · 0 comments
Closed

Error message for already specialized type is misleading #3172

apinski-cavium opened this issue Apr 4, 2022 · 0 comments
Assignees
Labels
bug This behavior is unintended and should be fixed.

Comments

@apinski-cavium
Copy link

Take:

header t<tt>
{
  bit y;
}

typedef t ty;
typedef ty<bit> tty;
typedef tty<bit> tty1;

Currently we get:

t2.p4(8): [--Werror=type-error] error: tty<bit<1>>: Type header t<...> is not generic and thus it cannot be specialized using type arguments
typedef tty<bit> tty1;
        ^^^^^^^^
t2.p4(7)
typedef ty<bit> tty;
        ^^^^^^^

But this is misleading and should be improved saying tty is already specialized so it cannot be specialized using type arguments or something to that effect.

@mihaibudiu mihaibudiu added the bug This behavior is unintended and should be fixed. label Apr 4, 2022
@mihaibudiu mihaibudiu self-assigned this Apr 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This behavior is unintended and should be fixed.
Projects
None yet
Development

No branches or pull requests

2 participants