Describe the bug
Code that uses new Date(argument) with an argument always produces the same thing - it is pure, but it gets flagged with an error.
Reproduction
- switch on the purity rule
- use the following repro
const CONST_DATE = new Date();
export function X({ myDate } : { myDate: string }) {
return new Date(myDate) < CONST_DATE ? <span>'one'</span> : <span>'two'</span>;
}
Expected behavior
no error if there is an argument passed to new Date
Platform and versions
windows and 3.0.0-beta.60
Stack trace
Additional context
No response