Repository navigation
[generics/error message] ?typeid shown in error message for missing type constraint #6725
Description
Activity
Labeling as a bug due to not wanting to leak the type ID here. The missing constraint is correct though.
smoothdeveloper commented
on May 16, 2019 ContributorAuthorMore actionsprobable location of the bug, or the callsite which gives some display settings as input parameter:
fsharp/src/fsharp/NicePrint.fs
Lines 782 to 804 in 2046609
and layoutConstraintsWithInfo denv env cxs = // Internally member constraints get attached to each type variable in their support. // This means we get too many constraints being printed. // So we normalize the constraints to eliminate duplicate member constraints let cxs = cxs |> ListSet.setify (fun (_, cx1) (_, cx2) -> match cx1, cx2 with | TyparConstraint.MayResolveMember(traitInfo1, _), TyparConstraint.MayResolveMember(traitInfo2, _) -> traitsAEquiv denv.g TypeEquivEnv.Empty traitInfo1 traitInfo2 | _ -> false) let cxsL = List.collect (layoutConstraintWithInfo denv env) cxs match cxsL with | [] -> emptyL | _ -> if denv.abbreviateAdditionalConstraints then wordL (tagKeyword "when") ^^ wordL(tagText "<constraints>") elif denv.shortConstraints then leftL (tagPunctuation "(") ^^ wordL (tagKeyword "requires") ^^ sepListL (wordL (tagKeyword "and")) cxsL ^^ rightL (tagPunctuation ")") else wordL (tagKeyword "when") ^^ sepListL (wordL (tagKeyword "and")) cxsL - added a commit that references this issue
on Jan 31, 2020 - added a commit that references this issue
on Feb 19, 2020 - added a commit that references this issue
on Feb 19, 2020 - addedImpact-Low(Internal MS Team use only) Describes an issue with limited impact on existing code.(Internal MS Team use only) Describes an issue with limited impact on existing code.
on Aug 31, 2020 - added a commit that references this issue
on Feb 23, 2021 Duplicate of #385
This was closed as duplicate, but the resolution of the duplicate did not resolve this one. Reopening, as the typeid-error is still there:

Related: #3508
🤖 This is an automated response from Repo Assist.
Verified that the underlying diagnostic bug still reproduces at repo HEAD
8512f9acbd9f757b75440b1ca6afe33fec321208(commit dated 2026-10-02, about 13 hours old at the start of this run).The freshly built FSI reports version 15.2.200.0 for F# 11.2, FSharp.Core 11.0.0.0, on .NET 11.0.0-rc.1.26420.103.
For the original
static member M<'a, 'b>(a: 'a, b: 'b) = a + brepro, the current compiler no longer prints a numbered identifier such as^?8018, but it still exposes an unresolved placeholder in the public diagnostic:error FS0043: A type parameter is missing a constraint 'when (^a or ^b) : (static member (+) : ^a * ^b -> '``?``)'So the numeric suffix has disappeared, but the result type is still rendered as the internal-looking `'``?``` rather than a meaningful type variable.
Warning
Firewall blocked 1 domain
The following domain was blocked by the firewall during workflow execution:
southcentralus0.in.applicationinsights.azure.com
To allow these domains, add them to the
network.allowedlist in your workflow frontmatter:network: allowed: - defaults - "southcentralus0.in.applicationinsights.azure.com"
See Network Configuration for more information.
Generated by 🌈 Repo Assist, see workflow run. Learn more.
Add this agentic workflows to your repo
To install this agentic workflow, run
gh aw add githubnext/agentics/workflows/repo-assist.md@7c7feb61a52b662eb2089aa2945588b7a200d404
This code exposes internally generated type identifiers in error messages:
Repro steps
Expected behavior
Actual behavior
Related information
vs 2019 16.0.3
ionide 3.37.0