dotnet / fsharp

The F# compiler, F# core library, F# language service, and F# tooling integration for Visual Studio
https://dotnet.microsoft.com/languages/fsharp
MIT License
3.94k stars 788 forks source link

Why doesn't this error message name the type: #1574

Closed KevinRansom closed 8 years ago

KevinRansom commented 8 years ago

It helpfully tells me the name of the missing field, but I need to edit the fsi to add the missing field. But this error expects me to load up the .fs goto the error line # to get the type then open up the fsi and goto the type.

If I simply had the type name I could go straight to the fsi and make the fix.

c:\kevinransom\visualfsharp\src\absil\il.fs(1757,6): error FS0311: The type definitions in the signature and implementation are not compatible because the field IgnoreSymbolStoreSequencePoints was present in the implementation but not in the signature [c:\kevinransom\visualfsharp\src\fsharp\FSharp.Compiler-proto\FSharp.Compiler-proto.fsproj]
forki commented 8 years ago

how can I print the type name of a TyconRepresentation?

dsyme commented 8 years ago

@forki Presumably in the context of

        and checkTypeDef (aenv: TypeEquivEnv) (implTycon:Tycon) (sigTycon:Tycon) =
            let m = implTycon.Range

you just use implTycon.DisplayName or something like that

forki commented 8 years ago

Added PR which adds type info to all of these error messages in #1834

dsyme commented 8 years ago

Fixed by @forki https://github.com/Microsoft/visualfsharp/pull/1834