Skip to content

Commit

Permalink
potential fix for #8 (2)
Browse files Browse the repository at this point in the history
  • Loading branch information
dsyme committed Apr 9, 2015
1 parent 67d4d7f commit 1776403
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/fsharp/tc.fs
Original file line number Diff line number Diff line change
Expand Up @@ -5111,12 +5111,10 @@ and TcExprOfUnknownTypeThen cenv env tpenv expr delayed =
try
TcExprThen cenv exprty env tpenv expr delayed
with e ->

// Error recovery - return some rubbish expression, but replace/annotate
// the type of the current expression with a type variable that indicates an error
let m = expr.Range
errorRecovery e m
solveTypAsError cenv env.DisplayEnv m ty
mkThrow m ty (mkOne cenv.g m), tpenv
solveTypAsError cenv env.DisplayEnv m exprty
mkThrow m exprty (mkOne cenv.g m), tpenv
expr',exprty,tpenv

/// This is used to typecheck legitimate 'main body of constructor' expressions
Expand Down

0 comments on commit 1776403

Please sign in to comment.