forked from p4lang/p4c
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix incorrect overload resolution for specialized (package) types (p4…
…lang#3412) Signed-off-by: Mihai Budiu <[email protected]>
- Loading branch information
Showing
11 changed files
with
98 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
parser mypt<t>(in t tt); | ||
|
||
parser MyParser1(in bit tt) { | ||
state start { | ||
transition select(tt) { | ||
0: accept; | ||
_: reject; | ||
} | ||
} | ||
} | ||
|
||
package mypackaget<t>(mypt<t> t2); | ||
package mypackaget<t>(mypt<t> t1, mypt<t> t2); | ||
mypackaget<bit>(MyParser1()) t4; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
parser mypt<t>(in t tt); | ||
|
||
parser MyParser1(in bit tt) { | ||
state start { | ||
transition select(tt) { | ||
0: accept; | ||
_: reject; | ||
} | ||
} | ||
} | ||
|
||
typedef bit t; | ||
package mypackaget(mypt<t> t2); | ||
package mypackaget(mypt<t> t1, mypt<t> t2); | ||
mypackaget(MyParser1()) t4; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
parser mypt<t>(in t tt); | ||
parser MyParser1(in bit<1> tt) { | ||
state start { | ||
transition select(tt) { | ||
1w0: accept; | ||
default: reject; | ||
} | ||
} | ||
} | ||
|
||
package mypackaget<t>(mypt<t> t2); | ||
package mypackaget<t>(mypt<t> t1, mypt<t> t2); | ||
mypackaget<bit<1>>(MyParser1()) t4; | ||
|
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
parser mypt<t>(in t tt); | ||
parser MyParser1(in bit<1> tt) { | ||
state start { | ||
transition select(tt) { | ||
0: accept; | ||
default: reject; | ||
} | ||
} | ||
} | ||
|
||
package mypackaget<t>(mypt<t> t2); | ||
package mypackaget<t>(mypt<t> t1, mypt<t> t2); | ||
mypackaget<bit<1>>(MyParser1()) t4; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
issue3379-1.p4(14): [--Wwarn=unused] warning: t4: unused instance | ||
mypackaget<bit>(MyParser1()) t4; | ||
^^ | ||
[--Wwarn=missing] warning: Program does not contain a `main' module |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
parser mypt<t>(in t tt); | ||
parser MyParser1(in bit<1> tt) { | ||
state start { | ||
transition select(tt) { | ||
1w0: accept; | ||
default: reject; | ||
} | ||
} | ||
} | ||
|
||
typedef bit<1> t; | ||
package mypackaget(mypt<t> t2); | ||
package mypackaget(mypt<t> t1, mypt<t> t2); | ||
mypackaget(MyParser1()) t4; | ||
|
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
parser mypt<t>(in t tt); | ||
parser MyParser1(in bit<1> tt) { | ||
state start { | ||
transition select(tt) { | ||
0: accept; | ||
default: reject; | ||
} | ||
} | ||
} | ||
|
||
typedef bit<1> t; | ||
package mypackaget(mypt<t> t2); | ||
package mypackaget(mypt<t> t1, mypt<t> t2); | ||
mypackaget(MyParser1()) t4; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
issue3379.p4(15): [--Wwarn=unused] warning: t4: unused instance | ||
mypackaget(MyParser1()) t4; | ||
^^ | ||
[--Wwarn=missing] warning: Program does not contain a `main' module |