Skip to content

[Feature request] Integrate with @deriving({abstract: light}) #183

Description

@mvaled

All the fields in the following script are reported as dead:

@deriving({abstract: light})
type person = {
  name: string,
  age: int,
}

let joe = person(~name="Joe", ~age=20)
let joeName = name(joe)

Report:

  Warning Dead Type
  File "src/TestBug.res", line 3, characters 2-14
  person.name is a record label never used to read a value
  <-- line 3
    @dead("person.name") name: string,

  Warning Dead Type
  File "src/TestBug.res", line 4, characters 2-10
  person.age is a record label never used to read a value
  <-- line 4
    @dead("person.age") age: int,

However, only age is not actually used in the code, while name shouldn't be reported.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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