Skip to content

Commit c7277a8

Browse files
authored
Remove SynType.MeasureDivide (#14148)
1 parent f4ac92f commit c7277a8

File tree

7 files changed

+0
-24
lines changed

7 files changed

+0
-24
lines changed

src/Compiler/Checking/CheckExpressions.fs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4353,9 +4353,6 @@ and TcTypeOrMeasure kindOpt (cenv: cenv) newOk checkConstraints occ (iwsam: Warn
43534353
| SynType.MeasurePower(ty, exponent, m) ->
43544354
TcTypeMeasurePower kindOpt cenv newOk checkConstraints occ env tpenv ty exponent m
43554355

4356-
| SynType.MeasureDivide(typ1, typ2, m) ->
4357-
TcTypeMeasureDivide kindOpt cenv newOk checkConstraints occ env tpenv typ1 typ2 m
4358-
43594356
| SynType.App(arg1, _, args, _, _, postfix, m) ->
43604357
TcTypeMeasureApp kindOpt cenv newOk checkConstraints occ env tpenv arg1 args postfix m
43614358

src/Compiler/Service/ServiceInterfaceStubGenerator.fs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,6 @@ type InterfaceData =
144144
| SynType.AnonRecd (_, ts, _) -> Some(ts |> Seq.choose (snd >> (|TypeIdent|_|)) |> String.concat "; ")
145145
| SynType.Array (dimension, TypeIdent typeName, _) -> Some(sprintf "%s [%s]" typeName (String(',', dimension - 1)))
146146
| SynType.MeasurePower (TypeIdent typeName, RationalConst power, _) -> Some(sprintf "%s^%s" typeName power)
147-
| SynType.MeasureDivide (TypeIdent numerator, TypeIdent denominator, _) -> Some(sprintf "%s/%s" numerator denominator)
148147
| SynType.Paren (TypeIdent typeName, _) -> Some typeName
149148
| _ -> None
150149

src/Compiler/Service/ServiceParseTreeWalk.fs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -820,7 +820,6 @@ module SyntaxTraversal =
820820
| SynType.WithGlobalConstraints (ty, _, _)
821821
| SynType.Array (_, ty, _) -> traverseSynType path ty
822822
| SynType.StaticConstantNamed (ty1, ty2, _)
823-
| SynType.MeasureDivide (ty1, ty2, _)
824823
| SynType.Or (ty1, ty2, _, _) -> [ ty1; ty2 ] |> List.tryPick (traverseSynType path)
825824
| SynType.Tuple (path = segments) -> getTypeFromTuplePath segments |> List.tryPick (traverseSynType path)
826825
| SynType.StaticConstantExpr (expr, _) -> traverseSynExpr [] expr

src/Compiler/Service/ServiceParsedInputOps.fs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -668,7 +668,6 @@ module ParsedInput =
668668
| SynType.Fun (argType = t1; returnType = t2) -> walkType t1 |> Option.orElseWith (fun () -> walkType t2)
669669
| SynType.WithGlobalConstraints (t, _, _) -> walkType t
670670
| SynType.HashConstraint (t, _) -> walkType t
671-
| SynType.MeasureDivide (t1, t2, _)
672671
| SynType.Or (t1, t2, _, _) -> walkType t1 |> Option.orElseWith (fun () -> walkType t2)
673672
| SynType.MeasurePower (t, _, _) -> walkType t
674673
| SynType.Paren (t, _)
@@ -1676,7 +1675,6 @@ module ParsedInput =
16761675
| SynType.Paren (t, _)
16771676
| SynType.SignatureParameter (usedType = t) -> walkType t
16781677
| SynType.Fun (argType = t1; returnType = t2)
1679-
| SynType.MeasureDivide (t1, t2, _)
16801678
| SynType.Or (t1, t2, _, _) ->
16811679
walkType t1
16821680
walkType t2

src/Compiler/SyntaxTree/SyntaxTree.fs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -427,8 +427,6 @@ type SynType =
427427

428428
| HashConstraint of innerType: SynType * range: range
429429

430-
| MeasureDivide of dividend: SynType * divisor: SynType * range: range
431-
432430
| MeasurePower of baseMeasure: SynType * exponent: SynRationalConst * range: range
433431

434432
| StaticConstant of constant: SynConst * range: range
@@ -458,7 +456,6 @@ type SynType =
458456
| SynType.StaticConstantExpr (range = m)
459457
| SynType.StaticConstantNamed (range = m)
460458
| SynType.HashConstraint (range = m)
461-
| SynType.MeasureDivide (range = m)
462459
| SynType.MeasurePower (range = m)
463460
| SynType.Paren (range = m)
464461
| SynType.SignatureParameter (range = m)

src/Compiler/SyntaxTree/SyntaxTree.fsi

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -492,9 +492,6 @@ type SynType =
492492
/// F# syntax: #type
493493
| HashConstraint of innerType: SynType * range: range
494494

495-
/// F# syntax: for units of measure e.g. m / s
496-
| MeasureDivide of dividend: SynType * divisor: SynType * range: range
497-
498495
/// F# syntax: for units of measure e.g. m^3, kg^1/2
499496
| MeasurePower of baseMeasure: SynType * exponent: SynRationalConst * range: range
500497

tests/FSharp.Compiler.Service.Tests/FSharp.CompilerService.SurfaceArea.netstandard.expected

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8498,12 +8498,6 @@ FSharp.Compiler.Syntax.SynType+LongIdentApp: Microsoft.FSharp.Core.FSharpOption`
84988498
FSharp.Compiler.Syntax.SynType+LongIdentApp: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range] get_lessRange()
84998499
FSharp.Compiler.Syntax.SynType+LongIdentApp: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range] greaterRange
85008500
FSharp.Compiler.Syntax.SynType+LongIdentApp: Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range] lessRange
8501-
FSharp.Compiler.Syntax.SynType+MeasureDivide: FSharp.Compiler.Syntax.SynType dividend
8502-
FSharp.Compiler.Syntax.SynType+MeasureDivide: FSharp.Compiler.Syntax.SynType divisor
8503-
FSharp.Compiler.Syntax.SynType+MeasureDivide: FSharp.Compiler.Syntax.SynType get_dividend()
8504-
FSharp.Compiler.Syntax.SynType+MeasureDivide: FSharp.Compiler.Syntax.SynType get_divisor()
8505-
FSharp.Compiler.Syntax.SynType+MeasureDivide: FSharp.Compiler.Text.Range get_range()
8506-
FSharp.Compiler.Syntax.SynType+MeasureDivide: FSharp.Compiler.Text.Range range
85078501
FSharp.Compiler.Syntax.SynType+MeasurePower: FSharp.Compiler.Syntax.SynRationalConst exponent
85088502
FSharp.Compiler.Syntax.SynType+MeasurePower: FSharp.Compiler.Syntax.SynRationalConst get_exponent()
85098503
FSharp.Compiler.Syntax.SynType+MeasurePower: FSharp.Compiler.Syntax.SynType baseMeasure
@@ -8554,7 +8548,6 @@ FSharp.Compiler.Syntax.SynType+Tags: Int32 Fun
85548548
FSharp.Compiler.Syntax.SynType+Tags: Int32 HashConstraint
85558549
FSharp.Compiler.Syntax.SynType+Tags: Int32 LongIdent
85568550
FSharp.Compiler.Syntax.SynType+Tags: Int32 LongIdentApp
8557-
FSharp.Compiler.Syntax.SynType+Tags: Int32 MeasureDivide
85588551
FSharp.Compiler.Syntax.SynType+Tags: Int32 MeasurePower
85598552
FSharp.Compiler.Syntax.SynType+Tags: Int32 Or
85608553
FSharp.Compiler.Syntax.SynType+Tags: Int32 Paren
@@ -8589,7 +8582,6 @@ FSharp.Compiler.Syntax.SynType: Boolean IsFun
85898582
FSharp.Compiler.Syntax.SynType: Boolean IsHashConstraint
85908583
FSharp.Compiler.Syntax.SynType: Boolean IsLongIdent
85918584
FSharp.Compiler.Syntax.SynType: Boolean IsLongIdentApp
8592-
FSharp.Compiler.Syntax.SynType: Boolean IsMeasureDivide
85938585
FSharp.Compiler.Syntax.SynType: Boolean IsMeasurePower
85948586
FSharp.Compiler.Syntax.SynType: Boolean IsOr
85958587
FSharp.Compiler.Syntax.SynType: Boolean IsParen
@@ -8608,7 +8600,6 @@ FSharp.Compiler.Syntax.SynType: Boolean get_IsFun()
86088600
FSharp.Compiler.Syntax.SynType: Boolean get_IsHashConstraint()
86098601
FSharp.Compiler.Syntax.SynType: Boolean get_IsLongIdent()
86108602
FSharp.Compiler.Syntax.SynType: Boolean get_IsLongIdentApp()
8611-
FSharp.Compiler.Syntax.SynType: Boolean get_IsMeasureDivide()
86128603
FSharp.Compiler.Syntax.SynType: Boolean get_IsMeasurePower()
86138604
FSharp.Compiler.Syntax.SynType: Boolean get_IsOr()
86148605
FSharp.Compiler.Syntax.SynType: Boolean get_IsParen()
@@ -8627,7 +8618,6 @@ FSharp.Compiler.Syntax.SynType: FSharp.Compiler.Syntax.SynType NewFun(FSharp.Com
86278618
FSharp.Compiler.Syntax.SynType: FSharp.Compiler.Syntax.SynType NewHashConstraint(FSharp.Compiler.Syntax.SynType, FSharp.Compiler.Text.Range)
86288619
FSharp.Compiler.Syntax.SynType: FSharp.Compiler.Syntax.SynType NewLongIdent(FSharp.Compiler.Syntax.SynLongIdent)
86298620
FSharp.Compiler.Syntax.SynType: FSharp.Compiler.Syntax.SynType NewLongIdentApp(FSharp.Compiler.Syntax.SynType, FSharp.Compiler.Syntax.SynLongIdent, Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range], Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Syntax.SynType], Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Text.Range], Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range], FSharp.Compiler.Text.Range)
8630-
FSharp.Compiler.Syntax.SynType: FSharp.Compiler.Syntax.SynType NewMeasureDivide(FSharp.Compiler.Syntax.SynType, FSharp.Compiler.Syntax.SynType, FSharp.Compiler.Text.Range)
86318621
FSharp.Compiler.Syntax.SynType: FSharp.Compiler.Syntax.SynType NewMeasurePower(FSharp.Compiler.Syntax.SynType, FSharp.Compiler.Syntax.SynRationalConst, FSharp.Compiler.Text.Range)
86328622
FSharp.Compiler.Syntax.SynType: FSharp.Compiler.Syntax.SynType NewOr(FSharp.Compiler.Syntax.SynType, FSharp.Compiler.Syntax.SynType, FSharp.Compiler.Text.Range, FSharp.Compiler.SyntaxTrivia.SynTypeOrTrivia)
86338623
FSharp.Compiler.Syntax.SynType: FSharp.Compiler.Syntax.SynType NewParen(FSharp.Compiler.Syntax.SynType, FSharp.Compiler.Text.Range)
@@ -8646,7 +8636,6 @@ FSharp.Compiler.Syntax.SynType: FSharp.Compiler.Syntax.SynType+Fun
86468636
FSharp.Compiler.Syntax.SynType: FSharp.Compiler.Syntax.SynType+HashConstraint
86478637
FSharp.Compiler.Syntax.SynType: FSharp.Compiler.Syntax.SynType+LongIdent
86488638
FSharp.Compiler.Syntax.SynType: FSharp.Compiler.Syntax.SynType+LongIdentApp
8649-
FSharp.Compiler.Syntax.SynType: FSharp.Compiler.Syntax.SynType+MeasureDivide
86508639
FSharp.Compiler.Syntax.SynType: FSharp.Compiler.Syntax.SynType+MeasurePower
86518640
FSharp.Compiler.Syntax.SynType: FSharp.Compiler.Syntax.SynType+Or
86528641
FSharp.Compiler.Syntax.SynType: FSharp.Compiler.Syntax.SynType+Paren

0 commit comments

Comments
 (0)