Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ let rec private tryFindTypedExpression (range: Range) (expressions: List<FSharpE
|> List.collect (fun (_, imlps) -> imlps)
let exprs =
List.append overrides interfaceImlps
|> Seq.cast<FSharpExpr>
|> Seq.map (fun expr -> expr.Body)
|> Seq.toList
tryFindTypedExpression range (baseCallExpr :: exprs @ rest)
| FSharpExprPatterns.TraitCall(_sourceTypes, _traitName, _typeArgs, _typeInstantiation, _argTypes, argExprs) :: rest ->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,24 @@ module Program =
"""

this.AssertNoWarnings()

[<Test>]
member this.``Regression test for object expressions``() =
this.Parse """
type Foo =
abstract Bar: unit -> unit

let host =
{ new Foo with
member _.Bar() =
() }

let x =
JsonDocument.Parse(responseBody).RootElement |> ignore
Option.ofObj(host).Value
"""

Assert.IsTrue this.ErrorsExist
(*
// Examples for future additions, see 'Foo.Bar.Baz' in partialInstanceMemberIdentifiers in .Core/.../NoPartialFunctions.fs

Expand Down
Loading