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

Source type inference is overriden by serialized type information #2

Open
Gabriel-Darbord opened this issue Dec 19, 2023 · 1 comment
Assignees

Comments

@Gabriel-Darbord
Copy link
Member

Example origin:

Map<String, String> foo() { /* ... */ }

Example serialized value:

{ "@type": "HashMap" }

The type inference ends up being HashMap and argument types (String) are lost.

@Gabriel-Darbord Gabriel-Darbord self-assigned this Dec 21, 2023
@Gabriel-Darbord Gabriel-Darbord transferred this issue from moosetechnology/Famix-OpenTelemetry Dec 21, 2023
@Gabriel-Darbord Gabriel-Darbord changed the title ValueLinker: origin type inference is overriden by serialized type information Source type inference is overriden by serialized type information Dec 21, 2023
@Gabriel-Darbord
Copy link
Member Author

Actually we want this behavior, however what we're missing are the type parameters of the concrete type.
In the example given above, it is correct to have an HashMap instead of a Map, however the <String, String> information is missing.
At some place, at some time, the value's concrete type and the code's type parameters should be used together to obtain the right type: HashMap<String, String>.

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