Skip to content

Give a concrete definition of trivial methods and update the way they are identified in the CheckUnused phase #16640

Open
@PaulCoral

Description

@PaulCoral

In #16157, -Wunused:params do not report trivial methods. These are currently identified as in Scala 2, i.e. by checking if their right hand side type is either: a constant type, single type, a literal, etc. See this comment.

The idea is to give a concrete formal definition of trivial methods, and update the code that identify them here .

Here's an idea of a trivial method:

def foo(a: Int, b: String) = ???

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions