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.