Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Constraint is missing from binding #39

Closed
1 of 2 tasks
nojaf opened this issue Apr 26, 2023 · 0 comments · Fixed by #42
Closed
1 of 2 tasks

Constraint is missing from binding #39

nojaf opened this issue Apr 26, 2023 · 0 comments · Fixed by #42

Comments

@nojaf
Copy link
Owner

nojaf commented Apr 26, 2023

Issue created from telplin-online

Implementation

module Telplin

[<Interface>]
type Node =
    abstract Children: int array

let noa<'n when 'n :> Node> (n: 'n option) =
    match n with
    | None -> Array.empty
    | Some n -> [| n :> Node |]

Signature

module Telplin

[<Interface>]
type Node =
    abstract Children: int array

val noa: n: 'n option -> Node array

Problem description

The signature and implementation are not compatible because the declaration of the type parameter 'n' requires a constraint of the form 'n :> Node

Extra information

  • The proposed signature has problems.
  • I or my company would be willing to help fix this.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant