Skip to content

Commit 9bd47af

Browse files
committed
Feedback
1 parent fcdd108 commit 9bd47af

File tree

4 files changed

+11
-25
lines changed

4 files changed

+11
-25
lines changed

buildtools/fsyacc/fsyaccast.fs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
22

33
module FsLexYacc.FsYacc.AST
44

5-
#nowarn "62" // This construct is for ML compatibility.
6-
7-
85
open System
96
open System.Collections.Generic
107
open Printf

buildtools/fsyacc/fsyaccpars.fs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@ open FSharp.Text.Parsing.ParseHelpers
1212
open FsLexYacc.FsYacc
1313
open FsLexYacc.FsYacc.AST
1414

15-
#nowarn "62" // This construct is for ML compatibility
16-
17-
1815
# 18 "fsyaccpars.fs"
1916
// This type is the type of tokens accepted by the parser
2017
type token =

src/Compiler/pars.fsy

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ let parse_error_rich = Some(fun (ctxt: ParseErrorContext<_>) ->
172172
%type <SynExpr> declExprBlock
173173
%type <SynPat> headBindingPattern
174174
%type <SynType> appTypeNullableInParens
175-
%type <SynType> atomTypeNonAtomicDeprecated
175+
%type <SynType> atomType
176176
%type <SynType> atomTypeOrAnonRecdType
177177
%type <SynExpr> atomicExprAfterType
178178
%type <SynExpr> typedSequentialExprBlock
@@ -2327,12 +2327,12 @@ opt_classDefn:
23272327

23282328
/* An 'inherits' definition in an object type definition */
23292329
inheritsDefn:
2330-
| INHERIT atomTypeNonAtomicDeprecated optBaseSpec
2330+
| INHERIT atomType optBaseSpec
23312331
{ let mDecl = unionRanges (rhs parseState 1) $2.Range
23322332
let trivia = { InheritKeyword = rhs parseState 1 }
23332333
SynMemberDefn.Inherit(Some $2, $3, mDecl, trivia) }
23342334

2335-
| INHERIT atomTypeNonAtomicDeprecated opt_HIGH_PRECEDENCE_APP atomicExprAfterType optBaseSpec
2335+
| INHERIT atomType opt_HIGH_PRECEDENCE_APP atomicExprAfterType optBaseSpec
23362336
{ let mDecl = unionRanges (rhs parseState 1) $4.Range
23372337
let trivia = { InheritKeyword = rhs parseState 1 }
23382338
SynMemberDefn.ImplicitInherit($2, $4, $5, mDecl, trivia) }
@@ -5142,15 +5142,15 @@ minusExpr:
51425142
| AMP_AMP minusExpr
51435143
{ SynExpr.AddressOf(false, $2, rhs parseState 1, unionRanges (rhs parseState 1) $2.Range) }
51445144

5145-
| NEW atomTypeNonAtomicDeprecated opt_HIGH_PRECEDENCE_APP atomicExprAfterType DOT atomicExprQualification
5145+
| NEW atomType opt_HIGH_PRECEDENCE_APP atomicExprAfterType DOT atomicExprQualification
51465146
{ errorR (Error (FSComp.SR.parsNewExprMemberAccess (), rhs parseState 6))
51475147
let newExpr = SynExpr.New(false, $2, $4, unionRanges (rhs parseState 1) $4.Range)
51485148
$6 newExpr (lhs parseState) (rhs parseState 5) }
51495149

5150-
| NEW atomTypeNonAtomicDeprecated opt_HIGH_PRECEDENCE_APP atomicExprAfterType
5150+
| NEW atomType opt_HIGH_PRECEDENCE_APP atomicExprAfterType
51515151
{ SynExpr.New(false, $2, $4, unionRanges (rhs parseState 1) $4.Range) }
51525152

5153-
| NEW atomTypeNonAtomicDeprecated opt_HIGH_PRECEDENCE_APP error
5153+
| NEW atomType opt_HIGH_PRECEDENCE_APP error
51545154
{ SynExpr.New(false, $2, arbExpr ("minusExpr", (rhs parseState 4)), unionRanges (rhs parseState 1) ($2).Range) }
51555155

51565156
| NEW error
@@ -5654,7 +5654,7 @@ optInlineAssemblyReturnTypes:
56545654
{ [] }
56555655

56565656
recdExpr:
5657-
| INHERIT atomTypeNonAtomicDeprecated opt_HIGH_PRECEDENCE_APP opt_atomicExprAfterType recdExprBindings opt_seps_block
5657+
| INHERIT atomType opt_HIGH_PRECEDENCE_APP opt_atomicExprAfterType recdExprBindings opt_seps_block
56585658
{ let arg = match $4 with None -> mkSynUnit (lhs parseState) | Some e -> e
56595659
let l = List.rev $5
56605660
let dummyField = mkRecdField (SynLongIdent([], [], [])) // dummy identifier, it will be discarded
@@ -5814,18 +5814,18 @@ objExpr:
58145814
let fullRange = match $3 with [] -> (rhs parseState 1) | _ -> (rhs2 parseState 1 3)
58155815
fullRange, (fun m -> let (a, b) = $1 in SynExpr.ObjExpr(a, b, None, [], [], $3, mNewExpr, m)) }
58165816

5817-
| NEW atomTypeNonAtomicDeprecated
5817+
| NEW atomType
58185818
{ let mNewExpr = rhs parseState 1
58195819
(rhs2 parseState 1 2), (fun m -> let (a, b) = $2, None in SynExpr.ObjExpr(a, b, None, [], [], [], mNewExpr, m)) }
58205820

58215821
objExprBaseCall:
5822-
| NEW atomTypeNonAtomicDeprecated opt_HIGH_PRECEDENCE_APP atomicExprAfterType baseSpec
5822+
| NEW atomType opt_HIGH_PRECEDENCE_APP atomicExprAfterType baseSpec
58235823
{ ($2, Some($4, Some($5))) }
58245824

5825-
| NEW atomTypeNonAtomicDeprecated opt_HIGH_PRECEDENCE_APP atomicExprAfterType
5825+
| NEW atomType opt_HIGH_PRECEDENCE_APP atomicExprAfterType
58265826
{ ($2, Some($4, None)) }
58275827

5828-
| NEW atomTypeNonAtomicDeprecated
5828+
| NEW atomType
58295829
{ $2, None }
58305830

58315831

@@ -6489,13 +6489,6 @@ powerType:
64896489
SynType.MeasurePower($1, SynRationalConst.Negate($3, m), lhs parseState)
64906490
else SynType.MeasurePower($1, $3, lhs parseState) }
64916491

6492-
6493-
/* Like appType but gives a deprecation error when a non-atomic type is used */
6494-
/* Also, doesn't start with '{|' */
6495-
atomTypeNonAtomicDeprecated:
6496-
| atomType
6497-
{ $1 }
6498-
64996492
atomTypeOrAnonRecdType:
65006493
| atomType
65016494
{ $1 }

src/FSharp.Core/prim-types-prelude.fsi

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77
#nowarn "35" // This construct is deprecated: the treatment of this operator is now handled directly by the F# compiler and its meaning may not be redefined.
88
#nowarn "61" // The containing type can use <c>null</c> as a representation value for its nullary union case. This member will be compiled as a static member.
9-
#nowarn "62" // This construct is for ML compatibility. The syntax <c>module ... : sig .. end</c> is deprecated unless OCaml compatibility is enabled. Consider using <c>module ... = begin .. end'.
109

1110
// Basic F# type definitions, functions and operators.
1211
namespace Microsoft.FSharp.Core

0 commit comments

Comments
 (0)