-
Notifications
You must be signed in to change notification settings - Fork 447
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
Container arguments with type infint are treated as type variables #3889
Conversation
@fruffy this also fixes some problems with the README, please review. |
This should supersede #3884 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updating the libbpf dependency might cause issues with the psa-ebpf or ebpf-kernel repository? Does that happen? I guess the XDP one is deprecated.
@@ -240,7 +238,7 @@ use them, but YMMV. | |||
|
|||
- Google Protocol Buffers 3.0 or higher for control plane API generation | |||
|
|||
- C++ boost library (minimally used) | |||
- C++ boost library |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should probably reduce our use of boost now that we have C++17 support.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, and fixes my testcases. If you check this in, I'll prep a change adding just the test.
@@ -240,7 +238,7 @@ use them, but YMMV. | |||
|
|||
- Google Protocol Buffers 3.0 or higher for control plane API generation | |||
|
|||
- C++ boost library (minimally used) | |||
- C++ boost library |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Looks like this is actually an unrelated change that crept into this PR? |
f427a02
to
b98c2bc
Compare
I have squashed the commits and added tests. |
Signed-off-by: Mihai Budiu <mbudiu@vmware.com>
b98c2bc
to
d18b173
Compare
Rebased on main to pickup the macos fixes so we can merge. |
@fruffy this fails with an assertion failure in the testing module. What can we do to merge this PR?
|
This could be non-determinism, let me rerun first. |
The test is passing now. Looks like a fluke because I do not understand how this line can fail. |
Fixes #3886
The problem is the following: given a constructor like
control C()(int x)
, the type of x is unified with the argument in every invocation of the constructor. But not all invocations must have the exact same argument type.In other parts of the compiler type 'int' (Type_InfInt) is treated like a type variable - and unification is used to decide the actual concrete type of an int expression. Here we do the same: when the control C is instantiated, we treat the type of x as a fresh type variable; in this way, the arguments of two separate instantiations of C do not need to unify with each other (via the common constructor type).
We do not require 4 and 5 to have the exact same type, they are different
int
types.