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

Formatter does not support enums with multiple identical values #846

Open
Geod24 opened this issue Apr 7, 2021 · 0 comments
Open

Formatter does not support enums with multiple identical values #846

Geod24 opened this issue Apr 7, 2021 · 0 comments
Labels

Comments

@Geod24
Copy link
Contributor

Geod24 commented Apr 7, 2021

import ocean.text.convert.Formatter;

enum Protocol { HTTP = 0, http = HTTP, }

void main ()
{
    auto x = format("{}", Protocol.init);
}
submodules/ocean/src/ocean/text/convert/Formatter.d(395): Error: duplicate case http in switch statement
submodules/ocean/src/ocean/text/convert/Formatter.d(280): Error: template instance ocean.text.convert.Formatter.handle!(Protocol) error instantiating
submodules/ocean/src/ocean/text/convert/Formatter.d(137):        instantiated from here: sformat!(Protocol)
foo.d(7):        instantiated from here: format!(Protocol)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant