daml
daml copied to clipboard
Daml Studio "Quick Fix" for Month enum value is incorrect
Affected Daml version
2.4.0
Bug description
In Daml Studio, when using the "Quick Fix" feature for a Month enum, the quick fix is not correct.
To reproduce
daml new quickfix --template empty-skeletoncd quickfixdaml studio- Create a new file
daml/QuickFix.daml(using code shown below) - Observe that the enum
Novis red-underlined. - Apply the Quick Fix "Add Nov to the import list of DA.Date"
- Observe that the line
import DA.Date (date)is changed toimport DA.Date (Nov, date), with a red underline.
QuickFix.daml
module QuickFix where
import Daml.Script
import DA.Date (date)
repro = script do
let today = date 2022 Nov 01
return ()
Expected behavior
The Quick Fix should result in import DA.Date (Month(Nov), date).
Or maybe import DA.Date (Month(..), date) would be even better.
Additional context
I ran into this while working through the Introduction to Daml
I'd be happy to address this issue if someone can point me in the right direction.