Skip to content

Regression with hash constraint seq postfix #15354

Description

@nojaf

When generating a signature file the result is somewhat unexpected.

Repro steps

module Telplin

open System
open System.Threading.Tasks

let mapWithAdditionalDependenies
    (mapping: 'a -> 'b * #seq<#IDisposable>) 
    (value: Task<'a>) : Task<'b> =
    failwith "meh"

leads to

module Telplin

val mapWithAdditionalDependenies:
  mapping: ('a -> 'b * #'b1 seq) -> value: System.Threading.Tasks.Task<'a> -> System.Threading.Tasks.Task<'b>
    when 'b1 :> System.IDisposable

Expected behaviour

#'b1 seq used to be #seq<'b1> and they are not equivalent.
It should be #('b1 seq)

Actual behaviour

(5, 23) (5,27) warning 64
This construct causes code to be less generic than indicated by its type annotations. The type variable implied by the use of a '#', '_' or other type annotation at or near 'f940e587b40f4e3b887999b1d37cd776.fsi(5,23)-(5,27)' has been constrained to be type ''b1'.

Related information

This is due to the changes in #15280.
I'll try and fix this.

FCS: FSharpCheckFileResults.GenerateSignature

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions