Skip to content

? in match type cases #18808

Closed
Closed
@nicolasstucki

Description

@nicolasstucki

Compiler version

3.3.1

Minimized code

import language.future

type F[X] = X match
  case List[_] => Int // `_` is deprecated for wildcard arguments of types: use `?` instead

type G[X] = X match
  case List[?] => Int

as this is a type binding we should use _ and not ?. The issue seems to come from parsing the type of the case with simpleType which always emits the deprecation.

Expectation

  • The deprecation warning should not be emitted
  • It seems that ? should not be allowed. We also allow ?

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions