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

Multiple definitions of the ports when using generics in the C target #1860

Closed
erlingrj opened this issue Jun 20, 2023 · 2 comments · Fixed by #1864
Closed

Multiple definitions of the ports when using generics in the C target #1860

erlingrj opened this issue Jun 20, 2023 · 2 comments · Fixed by #1864
Assignees

Comments

@erlingrj
Copy link
Collaborator

erlingrj commented Jun 20, 2023

This example program falis in the target C compiler:

target C;

reactor R<T> {
    input in: T
}

main reactor {
    r1 = new R<int>()
    r2 = new R<int>()
}

The problem is that struct representing the input port of the generic R is generated twice. I am guessing that the two instances of R, even though using the same template argument, get different TypeParameterizedReactor objects

@erlingrj
Copy link
Collaborator Author

erlingrj commented Jun 20, 2023

@petervdonovan is this your domain?

@petervdonovan
Copy link
Collaborator

Yep, I'll work on this.

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