cfg
attribute should remove the entire item from type checking, including its annotations
#6931
Labels
compiler: frontend
Everything to do with type checking, control flow analysis, and everything between parsing and IRgen
compiler: parser
Everything to do with the parser
compiler
General compiler. Should eventually become more specific as the issue is triaged
team:compiler
Compiler Team
By definition, a
cfg
attribute that cfg-evals to false effectively removes its annotated item from the AST and further type checking. E.g., this compiles whennew_encoding
is active, because the whole function gets removed from the type checking:Since the item is removed, its annotations must be removed as well. E.g., we shouldn't get warnings or errors for invalid annotations. This is currently not the case. E.g., this code:
will emit a warning, although the
not_type_checked
does not exist in the further compilation.The text was updated successfully, but these errors were encountered: