提交 bd667c52 编写于 作者: W Will Smith 提交者: Phillip Carter

Fixed Literal value in signature (#7901)

* Fixed literal sig from breaking subsequent sigs

* Added tests for literal sig

* Fixed test

* Fixed test name
上级 acafb503
......@@ -788,7 +788,7 @@ optLiteralValueSpfn:
| EQUALS declExpr
{ Some($2) }
| EQUALS OBLOCKBEGIN declExpr oblockend
| EQUALS OBLOCKBEGIN declExpr oblockend opt_ODECLEND
{ Some($3) }
......
......@@ -2155,6 +2155,12 @@ module TypecheckTests =
fsc cfg "%s --target:library -o:pos32.dll --warnaserror" cfg.fsc_flags ["pos32.fs"]
peverify cfg "pos32.dll"
[<Test>]
let ``sigs pos33`` () =
let cfg = testConfig "typecheck/sigs"
fsc cfg "%s --target:library -o:pos33.dll --warnaserror" cfg.fsc_flags ["pos33.fsi"; "pos33.fs"]
peverify cfg "pos33.dll"
[<Test>]
let ``sigs pos23`` () =
let cfg = testConfig "typecheck/sigs"
......
module Pos33
let x = 1
[<Literal>]
let y = 1
let z = 1
[<Literal>]
let w = "w"
let q = "q"
[<Literal>]
let u = "u"
\ No newline at end of file
module Pos33
val x : int
[<Literal>]
val y : int = 1
val z : int
[<Literal>]
val w : string = "w"
val q : string
[<Literal>]
val u : string =
"u"
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册