Skip to content

Commit 87d772e

Browse files
committed
Remove unnecessary bool flag
1 parent 1e3a8cd commit 87d772e

File tree

3 files changed

+7
-9
lines changed

3 files changed

+7
-9
lines changed

src/Compiler/Checking/CheckPatterns.fs

+1-1
Original file line numberDiff line numberDiff line change
@@ -803,7 +803,7 @@ and TcPatLongIdentLiteral warnOnUpper (cenv: cenv) env vFlags patEnv ty (mLongId
803803
match vref.LiteralValue with
804804
| None -> error (Error(FSComp.SR.tcNonLiteralCannotBeUsedInPattern(), m))
805805
| Some lit ->
806-
let _, _, _, vexpty, _, _ = TcVal true cenv env tpenv vref None None mLongId
806+
let _, _, _, vexpty, _, _ = TcVal cenv env tpenv vref None None mLongId
807807
CheckValAccessible mLongId env.AccessRights vref
808808
CheckFSharpAttributes g vref.Attribs mLongId |> CommitOperationResult
809809
CheckNoArgsForLiteral args m

src/Compiler/Checking/Expressions/CheckExpressions.fs

+6-7
Original file line numberDiff line numberDiff line change
@@ -2739,7 +2739,7 @@ let TcValEarlyGeneralizationConsistencyCheck (cenv: cenv) (env: TcEnv) (v: Val,
27392739
/// instantiationInfoOpt is is also set when building the final call for a reference to an
27402740
/// F# object model member, in which case the instantiationInfoOpt is the type instantiation
27412741
/// inferred by member overload resolution.
2742-
let TcVal checkAttributes (cenv: cenv) env (tpenv: UnscopedTyparEnv) (vref: ValRef) instantiationInfoOpt optAfterResolution m =
2742+
let TcVal (cenv: cenv) env (tpenv: UnscopedTyparEnv) (vref: ValRef) instantiationInfoOpt optAfterResolution m =
27432743
let g = cenv.g
27442744

27452745
let tpsorig, _, _, _, tinst, _ as res =
@@ -2749,8 +2749,7 @@ let TcVal checkAttributes (cenv: cenv) env (tpenv: UnscopedTyparEnv) (vref: ValR
27492749

27502750
CheckValAccessible m env.eAccessRights vref
27512751

2752-
if checkAttributes then
2753-
CheckValAttributes g vref m |> CommitOperationResult
2752+
CheckValAttributes g vref m |> CommitOperationResult
27542753

27552754
let vTy = vref.Type
27562755

@@ -3046,7 +3045,7 @@ let BuildPossiblyConditionalMethodCall (cenv: cenv) env isMutable m isProp minfo
30463045
| _ ->
30473046
#endif
30483047
let tcVal valref valUse ttypes m =
3049-
let _, exprForVal, _, tau, _, _ = TcVal true cenv env emptyUnscopedTyparEnv valref (Some (valUse, (fun x _ -> ttypes, x))) None m
3048+
let _, exprForVal, _, tau, _, _ = TcVal cenv env emptyUnscopedTyparEnv valref (Some (valUse, (fun x _ -> ttypes, x))) None m
30503049
exprForVal, tau
30513050

30523051
BuildMethodCall tcVal g cenv.amap isMutable m isProp minfo valUseFlags minst objArgs args staticTyOpt
@@ -5164,7 +5163,7 @@ and TcPatLongIdentActivePatternCase warnOnUpper (cenv: cenv) (env: TcEnv) vFlags
51645163
CallNameResolutionSink cenv.tcSink (mLongId, env.NameEnv, item, emptyTyparInst, ItemOccurrence.Pattern, env.eAccessRights)
51655164

51665165
// TOTAL/PARTIAL ACTIVE PATTERNS
5167-
let _, vExpr, _, _, tinst, _ = TcVal true cenv env tpenv vref None None m
5166+
let _, vExpr, _, _, tinst, _ = TcVal cenv env tpenv vref None None m
51685167
let vExpr = MakeApplicableExprWithFlex cenv env vExpr
51695168
let vExprTy = vExpr.Type
51705169

@@ -9259,7 +9258,7 @@ and TcValueItemThen cenv overallTy env vref tpenv mItem afterResolution delayed
92599258
error (Error(FSComp.SR.expressionHasNoName(), mExprAndTypeArgs))
92609259
| _ ->
92619260
let checkTys tpenv kinds = TcTypesOrMeasures (Some kinds) cenv NewTyparsOK CheckCxs ItemOccurrence.UseInType env tpenv tys mItem
9262-
let _, vExpr, isSpecial, _, _, tpenv = TcVal true cenv env tpenv vref (Some (NormalValUse, checkTys)) (Some afterResolution) mItem
9261+
let _, vExpr, isSpecial, _, _, tpenv = TcVal cenv env tpenv vref (Some (NormalValUse, checkTys)) (Some afterResolution) mItem
92639262

92649263
let vexpFlex = (if isSpecial then MakeApplicableExprNoFlex cenv vExpr else MakeApplicableExprWithFlex cenv env vExpr)
92659264
// We need to eventually record the type resolution for an expression, but this is done
@@ -9268,7 +9267,7 @@ and TcValueItemThen cenv overallTy env vref tpenv mItem afterResolution delayed
92689267

92699268
// Value get
92709269
| _ ->
9271-
let _, vExpr, isSpecial, _, _, tpenv = TcVal true cenv env tpenv vref None (Some afterResolution) mItem
9270+
let _, vExpr, isSpecial, _, _, tpenv = TcVal cenv env tpenv vref None (Some afterResolution) mItem
92729271

92739272
let vExpr, tpenv =
92749273
match vExpr with

src/Compiler/Checking/Expressions/CheckExpressions.fsi

-1
Original file line numberDiff line numberDiff line change
@@ -919,7 +919,6 @@ val TcPatLongIdentActivePatternCase:
919919
val ConvSynPatToSynExpr: synPat: SynPat -> SynExpr
920920

921921
val TcVal:
922-
checkAttributes: bool ->
923922
cenv: TcFileState ->
924923
env: TcEnv ->
925924
tpenv: UnscopedTyparEnv ->

0 commit comments

Comments
 (0)