Skip to content

Polymorphic function parameter types not inferred #6892

Open
@LPTK

Description

@LPTK

minimized code

val f: [A] => A => A = a => a

// same with:

val f: [A] => A => A = [A] => a => a

Weirdly, the error is reported as a "Syntax Error":

[error] -- [E081] Syntax Error: infer.scala:6:25 
[error] 6 |  val f: [A] => A => A = a => a
[error]   |                         ^
[error]   |                         Missing parameter type
[error]   |                         
[error]   |                         I could not infer the type of the parameter a.
[error] one error found

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions