-
Notifications
You must be signed in to change notification settings - Fork 56
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
Duplicate functions should be a problem #354
Comments
internally the index is organized as an IndexMap. This means that we cannot store two functions with the same name. alternative: the indexer also collects errors and we do not index the 2nd function with the same name (so it will be invisible for the rest of the application's validation). also importing a file's index into the global index may now collect errors. @ghaith what do you think? |
I'm open to having the indexer report errors regardless of the multimap solution. |
needs location in index #285 |
when calling a generic function, we register an implementation and a POU in the index to later link against it. If multiple calls discover the same generic implementation (e.g. INT-implementation), they were added mulitple times to the index and the fix implemented in #354 caused a problem. ImplementationIndexEntry move back to IndexMap - we only keep one entry per name - there is no value since the POUIndexEntries handle the duplication validation. When importing POUIndexEntries we ignore automatically generated entries if they are already in the index.
when calling a generic function, we register an implementation and a POU in the index to later link against it. If multiple calls discover the same generic implementation (e.g. INT-implementation), they were added mulitple times to the index and the fix implemented in #354 caused a problem. ImplementationIndexEntry move back to IndexMap - we only keep one entry per name - there is no value since the POUIndexEntries handle the duplication validation. When importing POUIndexEntries we ignore automatically generated entries if they are already in the index. fixes #637
when calling a generic function, we register an implementation and a POU in the index to later link against it. If multiple calls discover the same generic implementation (e.g. INT-implementation), they were added mulitple times to the index and the fix implemented in #354 caused a problem. ImplementationIndexEntry move back to IndexMap - we only keep one entry per name - there is no value since the POUIndexEntries handle the duplication validation. When importing POUIndexEntries we ignore automatically generated entries if they are already in the index. fixes #637
If you define a function twice, the compiler does not report a problem.
This is probably also the case for any other POU.
The text was updated successfully, but these errors were encountered: