Open
Description
Description
Given the following code :
open System
type ISomeInterfaceWithDisposable =
interface
inherit IDisposable
end
type SomeDisposableType() =
interface ISomeInterfaceWithDisposable with
member _.Dispose() = ()
module Program =
let foo = new SomeDisposableType() :> ISomeInterfaceWithDisposable
Considering that the type is a disposable through the ISomeInterfaceWithDisposable
interface, my expectations is that this needs a new
keyword.
Repro steps
Run FSharpLint on the following code with 0.21.3
Expected behavior
The redundant key word error to not be raised (this is what I would expect)
Actual behavior
The redundant key word error is raised
Known workarounds
Remove the new
keyword from all occurence of this pattenr
Related information
Issue occurs on 0.21.3
Doesn't occur on 0.21.2
Windows 10
dotnet 6