Skip to content

Commit

Permalink
Include 'const' keyword range in static constant expr range (#10165)
Browse files Browse the repository at this point in the history
  • Loading branch information
DedSec256 authored Sep 21, 2020
1 parent aa4eeb6 commit bec9b08
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/fsharp/pars.fsy
Original file line number Diff line number Diff line change
Expand Up @@ -5044,7 +5044,7 @@ atomType:

| CONST atomicExpr
{ let e, _ = $2
SynType.StaticConstantExpr(e, e.Range) }
SynType.StaticConstantExpr(e, lhs parseState) }

| FALSE
{ SynType.StaticConstant(SynConst.Bool false, lhs parseState) }
Expand Down
2 changes: 1 addition & 1 deletion tests/fsharp/typeProviders/negTests/neg1.bsl
Original file line number Diff line number Diff line change
Expand Up @@ -1358,7 +1358,7 @@ neg1.fsx(341,110,341,114): typecheck error FS0001: This expression was expected
but here has type
'bool'

neg1.fsx(342,110,342,114): typecheck error FS3045: Invalid static argument to provided type. Expected an argument of kind 'string'.
neg1.fsx(342,104,342,114): typecheck error FS3045: Invalid static argument to provided type. Expected an argument of kind 'string'.

neg1.fsx(345,104,345,106): typecheck error FS3045: Invalid static argument to provided type. Expected an argument of kind 'float'.

Expand Down

0 comments on commit bec9b08

Please sign in to comment.