Skip to content

Commit

Permalink
Better debug errors
Browse files Browse the repository at this point in the history
  • Loading branch information
auduchinok committed Dec 20, 2023
1 parent 84738af commit 8003333
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Compiler/Checking/CheckDeclarations.fs
Original file line number Diff line number Diff line change
Expand Up @@ -4128,7 +4128,7 @@ module TcDeclarations =
typar.SetIdent(untypedIdent)
)

let tps = ttypes |> List.map (function TType_var(typar, _) -> typar | _ -> failwith "123")
let tps = ttypes |> List.map (function TType_var(typar, _) -> typar | t -> failwith $"ComputeTyconDeclKind: {t}")
types, tcref, tps

| Exception exn ->
Expand Down
2 changes: 1 addition & 1 deletion src/Compiler/Checking/CheckExpressions.fs
Original file line number Diff line number Diff line change
Expand Up @@ -4954,7 +4954,7 @@ and TcTypeApp (cenv: cenv) newOk checkConstraints occ env tpenv m tcref pathType
if tcref.Deref.IsProvided then TcProvidedTypeApp cenv env tpenv tcref synArgTys m else
#endif

let tps = tinst |> List.map (function TType_var(typar, _) -> typar | _ -> failwith "123")
let tps = tinst |> List.map (function TType_var(typar, _) -> typar | t -> failwith $"TcTypeApp: {t}")

// If we're not checking constraints, i.e. when we first assert the super/interfaces of a type definition, then just
// clear the constraint lists of the freshly generated type variables. A little ugly but fairly localized.
Expand Down

0 comments on commit 8003333

Please sign in to comment.