Skip to content

+: extractor is not able to infer the return type for a SeqView #7879

@Atry

Description

@Atry

minimized code

val head1 +: _ = List(1).view
val _: Int = head1

When compiling with Dotty 0.21.0-RC1, it reports the following error:

Found:    (head1 : Any)
Required: Int

expectation

It should compile without error as Scala 2.13 did.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions