Skip to content

Commit cecf446

Browse files
SantiagoBautistaMihai Budiu
authored andcommitted
Add testcase corresponding to issue #1342 (#1380)
1 parent 5e0fd51 commit cecf446

File tree

5 files changed

+20
-0
lines changed

5 files changed

+20
-0
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
const bit X = 1;
2+
3+
bit f<X>() {
4+
return .X ;
5+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
const bit<1> X = 1w1;
2+
bit<1> f<X>() {
3+
return 1w1;
4+
}

testdata/p4_16_samples_outputs/issue1342-frontend.p4

Whitespace-only changes.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
const bit<1> X = 1;
2+
bit<1> f<X>() {
3+
return .X;
4+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
issue1342.p4(3): warning: X shadows X
2+
bit f<X>() {
3+
^
4+
issue1342.p4(1)
5+
const bit X = 1;
6+
^
7+
warning: Program does not contain a `main' module

0 commit comments

Comments
 (0)