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

Overloading of package should be disallowed #5089

Open
jaehyun1ee opened this issue Jan 6, 2025 · 0 comments
Open

Overloading of package should be disallowed #5089

jaehyun1ee opened this issue Jan 6, 2025 · 0 comments
Labels
p4-spec Topics related to the P4 specification (https://github.com/p4lang/p4-spec/).

Comments

@jaehyun1ee
Copy link

The spec puts a side-note about overloading in 7.2.10.2. Extern Objects:

Notice that overloading of parsers, controls, or packages is not allowed.

However, issue3379-1.p4 and issue3379.p4 are accepted by the p4c frontend while they define an overloaded package type.

package mypackaget(mypt<t> t2);
package mypackaget(mypt<t> t1, mypt<t> t2);
@fruffy fruffy added the p4-spec Topics related to the P4 specification (https://github.com/p4lang/p4-spec/). label Jan 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p4-spec Topics related to the P4 specification (https://github.com/p4lang/p4-spec/).
Projects
None yet
Development

No branches or pull requests

2 participants