Fix handling of constness in Typifier
Improves the handling of constness in the typifier.
Left-hand sides of non-declaration assignments may not be const
. For the typifier to tell apart const from non-const expressions, it needs to track constness in the TypeContext
. This MR adds that ability: All expressions are now by default assigned const
types, unless otherwise specified. This does not change the handling of untyped symbols, which still receive the default_dtype
. A PsSymbolExpr
may therefore now have a different const
qualifier than its wrapped PsSymbol
.
Additionally, this MR further documents and clarified the behaviour and control flow of the typifier.
Merge request reports
Activity
requested review from @he66coqe
assigned to @da15siwa
- Resolved by Frederik Hennig
added 1 commit
- 7526c0db - Add clarifying docstring to TypeContext compatibility check
enabled an automatic merge when the pipeline for 7526c0db succeeds
mentioned in commit 191cc207