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

Expression constant generation at multiple types is broken #4

Open
maurer opened this issue Nov 16, 2017 · 0 comments
Open

Expression constant generation at multiple types is broken #4

maurer opened this issue Nov 16, 2017 · 0 comments
Labels

Comments

@maurer
Copy link
Owner

maurer commented Nov 16, 2017

If you have an expression which can be used to construct multiple types, the generated code will not populate all of them correctly. For example, take

type V0 = Vec<u8>;
type V1 = Vec<u16>;

The mycroft program

foo(V0)
bar(V1)
?get_foo(~(Vec::new()))
?get_bar(~(Vec::new()))

will generate incorrect code.

One possibility for fixing this is to add types to all constant names.

For now, the workaround is to give a specialized name to the function in the surrounding code.

@maurer maurer added the bug label Nov 16, 2017
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