Skip to content

Commit 0e3d4d1

Browse files
TIHanbaronfel
authored andcommitted
Fixed Literal value in signature (#7901)
* Fixed literal sig from breaking subsequent sigs * Added tests for literal sig * Fixed test * Fixed test name
1 parent 899d210 commit 0e3d4d1

File tree

3 files changed

+24
-1
lines changed

3 files changed

+24
-1
lines changed

src/fsharp/pars.fsy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -788,7 +788,7 @@ optLiteralValueSpfn:
788788
| EQUALS declExpr
789789
{ Some($2) }
790790

791-
| EQUALS OBLOCKBEGIN declExpr oblockend
791+
| EQUALS OBLOCKBEGIN declExpr oblockend opt_ODECLEND
792792
{ Some($3) }
793793

794794

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
module Pos33
2+
3+
let x = 1
4+
[<Literal>]
5+
let y = 1
6+
let z = 1
7+
[<Literal>]
8+
let w = "w"
9+
let q = "q"
10+
[<Literal>]
11+
let u = "u"
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
module Pos33
2+
3+
val x : int
4+
[<Literal>]
5+
val y : int = 1
6+
val z : int
7+
[<Literal>]
8+
val w : string = "w"
9+
val q : string
10+
[<Literal>]
11+
val u : string =
12+
"u"

0 commit comments

Comments
 (0)