rescript-compiler
rescript-compiler copied to clipboard
"Missing required props" error does not show line number when component has `children` prop
ReScript version v12.0.0-alpha.14's "Missing required props" error does not show line numbers when the component has a children prop:
module Wrapper = {
@react.component
let make = (~value: 'value, ~children: React.element) => {
<div> {children} </div>
}
}
module SomeComponent = {
@react.component
let make = () => {
<Wrapper>
<div> {""->React.string} </div>
</Wrapper>
}
}
FAILED: Foo.cmj
We've found a bug for you!
/home/mediremi/test/Foo.res
The component <Wrapper /> is missing these required props:
value
I'll try to check your issues over the weekend. It most likely related to jsx ast.
Feels like some loc's have gone missing perhaps.
Yes, I bet this is similar too https://github.com/rescript-lang/rescript/pull/7533