Skip to content

Error "recursive value needs type" when named tuple used with single field #23893

@road21

Description

@road21

Compiler version

3.7.2
3.7.3-RC1

Minimized code

val foo: (f: String) = "" *: EmptyTuple val g = foo.f // ok val f = foo.f // error: recursive value foo needs type

Output

Recursive value foo needs type Run with -explain-cyclic for more details. 

Expectation

If the error is expected, then there should be different text (value foo has type annotation).
But I expect that it should compiling.

Note

The following snippet is compiling:

val foo: (f: String, g: Int) = ("", 42) val f = foo.f

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions