(Closes #2201) Implementation enabling FileContainer's to have information about routines outside of modules.
Likely missing coverage and FAILED psyir/backend/fortran_test.py::test_fw_filecontainer_error1 test fails.
Also waiting on #2566 for fixing some tests before this will be ready.
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 99.86%. Comparing base (
5bbe862) to head (843b163).
Additional details and impacted files
@@ Coverage Diff @@
## master #2575 +/- ##
=======================================
Coverage 99.86% 99.86%
=======================================
Files 351 351
Lines 48339 48396 +57
=======================================
+ Hits 48274 48331 +57
Misses 65 65
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
This is ready for a look now - I think its a pretty small change overall.
Changed my mind, there's some missing coverage (which i need to decide if its reachable) and I think I will also fix #2582 here.
Changed my mind, there's some missing coverage (which i need to decide if its reachable) and I think I will also fix #2582 here.
I think we should fix #2582 by adding Routine._symbol (unless I'm missing something?).
I think adding Routine._symbol is a bigger change but maybe thats a better place to solve #2582 than doing it effectively twice.
Ok - I checked this now @sergisiso.
We can't pass a subroutine to either psyir_from_expression or psyir_from_statement, they aren't valid for those entry points so I think we will always have a Container above a subroutine, so I'm going to remove the try/except from here:
try:
routine_symbol = routine.symbol_table.lookup(routine.name)
routine_symbol.datatype = base_type
except KeyError:
pass
as I think we will always have that routine.name in a container.
Should now be ready for review.
Are we best delaying this now until #2596 is done @LonelyCat124 ?
Ready for another look
@LonelyCat124 I put this back with reviewed with actions to clarify if the last commit after your message that this was ready belongs here, because the same commit is also in your Routine.symbol PR
@sergisiso Sorry i forgot to check this yesterday. I don't think that commit is on this branch, its just mentioned in the commit message.