Skip to content
This repository has been archived by the owner on Dec 23, 2024. It is now read-only.

Commit

Permalink
Include 'const' keyword range in static constant expr range (dotnet#1…
Browse files Browse the repository at this point in the history
  • Loading branch information
DedSec256 authored and nosami committed Feb 22, 2021
1 parent e00e2d7 commit fac36b9
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 fac36b9

Please sign in to comment.