cog icon indicating copy to clipboard operation
cog copied to clipboard

Add type field to Argument constant

Open spinillos opened this issue 1 year ago • 1 comments

This issue is to investigate if there is a easy way to do this change:

Currently we have:

type AssignmentValue struct {
	Argument *Argument           `json:",omitempty"`
	Constant any                 `json:",omitempty"`
	Envelope *AssignmentEnvelope `json:",omitempty"`
}

And we want to update with something like:

type AssignmentValue struct {
	Argument *Argument           `json:",omitempty"`
	Constant *Constant                 `json:",omitempty"`
	Envelope *AssignmentEnvelope `json:",omitempty"`
}

type Constant {
   Value any
   Type Type
}

Why? Argument Constant doesn't have any information about the type of the field that we are we setting.

From most of the languages ins't a big deal, but for Java enums are classes and we couldn't set a String or an Integer directly here.

spinillos avatar Jan 25 '24 16:01 spinillos