dotnet / dotnet/fsharp

[generics/error message] `?typeid` shown in error message for missing type constraint

Open
#6,725 4 comments 0 reactions 0 assignees View on GitHub
Bug Impact-Low
Dominant language
F#
Stars
4.3k
Forks
876
Avg merge
4d 11h
Merged PRs (30d)
131

Description

This code exposes internally generated type identifiers in error messages:

#### Repro steps

```fsharp
type C() =
static member M<'a,'b>(a: 'a, b: 'b) = a + b
```

#### Expected behavior

> A type parameter is missing a constraint 'when ( ^a or ^b) : (static member ( + ) : ^a * ^b -> ^c) ...'

#### Actual behavior

> A type parameter is missing a constraint 'when ( ^a or ^b) : (static member ( + ) : ^a * ^b -> ^?8018)'

![image](https://user-images.githubusercontent.com/87944/57672860-ad235f00-75ce-11e9-936d-1ceee81142bf.png)

![image](https://user-images.githubusercontent.com/87944/57672879-c3311f80-75ce-11e9-84af-685c6e45b941.png)

#### Related information
vs 2019 16.0.3
ionide 3.37.0

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.