Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix #5752: Julia: Fix inclusion of methods of imported functions and …
…handling of… (#5768) … parametric methods If the code contains a method, specializing a function that is defined in a different module (e.g. Base), then the method would be ignored. The `names` function offers the `imported` parameter, which leads to inclusion of imported functions. However, this also leads to inclusion of many methods that are not defined in the given code. To only consider the methods from the input code, the input module `m` is passed to the method searching call `methods(fun, m)`. While debugging, another bug surfaced: methods with parametric types would lead to an error, because the type for these methods is represented differently. In this cases, `specTypes` is of type `UnionAll`, which does not have a member `parameters`, but the members `var` and `body` to represent the parametric structure of the type. Also see https://docs.julialang.org/en/v1/devdocs/types/#UnionAll-types By checking the `specType` member for the type `UnionAll`, this can be fixed. Fixes #5752 Co-authored-by: Alex Wiens <alex.wiens@uni-paderborn.de>
- Loading branch information