Skip to content

Commit

Permalink
tests: add test for FStarLang#3145
Browse files Browse the repository at this point in the history
  • Loading branch information
mtzguido committed Jun 17, 2024
1 parent 193e675 commit b011778
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/error-messages/Bug3145.fst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module Bug3145

let t1 = int * int * int
let t2 = int * int & int
let t3 = int & int * int
let t4 = int & int & int
47 changes: 47 additions & 0 deletions tests/error-messages/Bug3145.fst.expected
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
Module after desugaring:
module Bug3145
Declarations: [
let t1 = Prims.int & Prims.int & Prims.int
let t2 = (Prims.int & Prims.int) & Prims.int
let t3 = Prims.int & (Prims.int & Prims.int)
let t4 = Prims.int & Prims.int & Prims.int
]
Exports: [
let t1 = Prims.int & Prims.int & Prims.int
let t2 = (Prims.int & Prims.int) & Prims.int
let t3 = Prims.int & (Prims.int & Prims.int)
let t4 = Prims.int & Prims.int & Prims.int
]

Module before type checking:
module Bug3145
Declarations: [
let t1 = Prims.int & Prims.int & Prims.int
let t2 = (Prims.int & Prims.int) & Prims.int
let t3 = Prims.int & (Prims.int & Prims.int)
let t4 = Prims.int & Prims.int & Prims.int
]
Exports: [
let t1 = Prims.int & Prims.int & Prims.int
let t2 = (Prims.int & Prims.int) & Prims.int
let t3 = Prims.int & (Prims.int & Prims.int)
let t4 = Prims.int & Prims.int & Prims.int
]

Module after type checking:
module Bug3145
Declarations: [
let t1 = Prims.int & Prims.int & Prims.int
let t2 = (Prims.int & Prims.int) & Prims.int
let t3 = Prims.int & (Prims.int & Prims.int)
let t4 = Prims.int & Prims.int & Prims.int
]
Exports: [
let t1 = Prims.int & Prims.int & Prims.int
let t2 = (Prims.int & Prims.int) & Prims.int
let t3 = Prims.int & (Prims.int & Prims.int)
let t4 = Prims.int & Prims.int & Prims.int
]

Verified module: Bug3145
All verification conditions discharged successfully
1 change: 1 addition & 0 deletions tests/error-messages/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ all: check-all
# matches the expected file.
Bug1997.fst.output: OTHERFLAGS+=--dump_module Bug1997
Bug2820.fst.output: OTHERFLAGS+=--dump_module Bug2820
Bug3145.fst.output: OTHERFLAGS+=--dump_module Bug3145
Bug3227.fst.output: OTHERFLAGS+=--dump_module Bug3227
Bug3292.fst.output: OTHERFLAGS+=--dump_module Bug3292
CalcImpl.fst.output: OTHERFLAGS+=--dump_module CalcImpl
Expand Down

0 comments on commit b011778

Please sign in to comment.