Skip to content

Either.catchOnly and -Yexplicit-nulls are not playing well together #4681

Open
@joan38

Description

Hi,

Either.catchOnly does not seem usable with -Yexplicit-nulls enabled on Scala 3.5.2:

[error] -- [E057] Type Mismatch Error: /.../CaseAppParsers.scala:18:17 
[error] 18 |      .catchOnly[NumberFormatException](Duration(s))
[error]    |                 ^
[error]    |Type argument NumberFormatException does not conform to lower bound Null
[error]    |
[error]    | longer explanation available when compiling with `-explain`
[error] two errors found

Is there something that can be done at the library level?

Thanks

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions