You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have encountered an issue while using the Go script for merging source files, particularly with the merging of constant declarations. The script combines constants into a single declaration, leading to initialization errors in the merged file.
Reproduction Steps
Define a custom type and constants as follows in separate files:
The merged file shows errors in the constant declaration section, with some constants missing their initializations.
// File: _merged.gopackage main
const (
EndangeredNormalModeStrategy=iotaRescueHumanRescueEndangeredOkCategory=iotaLostRescue
)
type (
CategoryintStrategyint
)
The issue seems to be related to the script combining constant declarations without maintaining their original structure and initializations. This can lead to incorrect behavior when using the merged file.
The text was updated successfully, but these errors were encountered:
@guiyomh thanks for sharing. I have noticed this issue with iota constants for a while, btw I am not using this and use values in constants instead.
I'll take a look if I can manage to keep constants groups with iota notation and if that didn't break everything, I think I could fix it. Currently haven't much time, could be great, if you can propose pr.
Issue Description
I have encountered an issue while using the Go script for merging source files, particularly with the merging of constant declarations. The script combines constants into a single declaration, leading to initialization errors in the merged file.
Reproduction Steps
Observed Behavior
The merged file shows errors in the constant declaration section, with some constants missing their initializations.
The issue seems to be related to the script combining constant declarations without maintaining their original structure and initializations. This can lead to incorrect behavior when using the merged file.
The text was updated successfully, but these errors were encountered: