Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Uncore une fois
  • Loading branch information
KevinRansom committed Jul 10, 2019
commit c87ed3ece1146bc6bd87f4c1caf563172aec568a
4 changes: 2 additions & 2 deletions src/fsharp/TypeChecker.fs
Original file line number Diff line number Diff line change
Expand Up @@ -5806,7 +5806,7 @@ and TcExprUndelayed cenv overallTy env tpenv (synExpr: SynExpr) =
// LanguageFeatures.ImplicitYield do not require this validation
let implicitYieldEnabled = cenv.g.langVersion.SupportsFeature LanguageFeature.ImplicitYield
let validateObjectSequenceOrRecordExpression = not implicitYieldEnabled
let validateExpressionWithIfRequiresParnethesis = implicitYieldEnabled
let validateExpressionWithIfRequiresParenethesis = not implicitYieldEnabled
let acceptDeprecatedIfThenExpression = not implicitYieldEnabled

match synExpr with
Expand Down Expand Up @@ -6022,7 +6022,7 @@ and TcExprUndelayed cenv overallTy env tpenv (synExpr: SynExpr) =
| SynExpr.CompExpr (_, _, (SimpleSemicolonSequence cenv acceptDeprecatedIfThenExpression elems as body), _) ->
match body with
| SimpleSemicolonSequence cenv false _ -> ()
| _ when validateExpressionWithIfRequiresParnethesis -> errorR(Deprecated(FSComp.SR.tcExpressionWithIfRequiresParenthesis(), m))
| _ when validateExpressionWithIfRequiresParenethesis -> errorR(Deprecated(FSComp.SR.tcExpressionWithIfRequiresParenthesis(), m))
| _ -> ()

let replacementExpr =
Expand Down