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

If this is an enum with explicit type conversion and never be referenced by other const, it will not be evaluated #1555

Closed
sdghchj opened this issue Apr 17, 2023 · 0 comments

Comments

@sdghchj
Copy link
Member

sdghchj commented Apr 17, 2023

Describe the bug
If this is an enum with explicit type conversion and never be referenced by other const, it will not be evaluated.

To Reproduce
For example:

type Class int

const (
     CA Class = iota + 1
     CB 
)

type Kind int

const (
     KA = Kind(1 + 2)
     KB  = Kind(CA + CB)
)

Expected behavior
KA, KB should be enums of type Kind

@sdghchj sdghchj changed the title If this is an enum with explicite type conversion and never be referenced by other const, it will not be evaluated If this is an enum with explicit type conversion and never be referenced by other const, it will not be evaluated Apr 17, 2023
@sdghchj sdghchj closed this as completed Apr 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant