Skip to content

Add flag to control whether out of scope variables should be deferred with -fdefer-typed-holes

As a result of #10569 (closed), out of scope variables are turned into special type holes so that type information of the variable can be attached to the error message. However, this causes problems when used with -fdefer-typed-holes as scope errors have been turned into type errors and are now deferred when using this flag.

Richard sums up the situation, "Even if someone is deferring type errors, I imagine most people don't want to defer scope errors". It would be good to add a flag which controls whether out of scope variables are also deferrable when used with existing deferral flags.

Goal: Add a flag -fdefer-out-of-scope-variables which controls whether out of scope variables are deferred when using -fdefer-typed-holes. It should be turned off by default.

Trac metadata
Trac field Value
Version 8.0.1
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related #10569 (closed)
Blocking
CC ertes
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information