Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add type field to Argument constant #228

Open
spinillos opened this issue Jan 25, 2024 · 1 comment
Open

Add type field to Argument constant #228

spinillos opened this issue Jan 25, 2024 · 1 comment

Comments

@spinillos
Copy link
Member

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.

@K-Phoen
Copy link
Member

K-Phoen commented Jan 26, 2024

Isn't the information found in Assignment.Path enough?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants