Skip to content

Async.async gives "nullary-override" warning when not provided with explicit type #238

Closed
@shubhamJay

Description

@shubhamJay
val a = async { "hello" } // gives warning 
val b: Future[String] = async { "hello" }

While compiling the above code with compiler option "-Xlint:nullary-override" enabled on scala 2.13.2 version, the first line throws an warning saying nullary method assumes an empty parameter list from the overridden definition. After providing explicit type, the warning goes away as written on second line.

Metadata

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