class Thing def main is shared pass var _x as int def foo(x as int?) if x is nil x = _x # The warning "Setting a parameter to a class variable is often a mistake. ..." shouldn't apply here because the parameter is referenced in the condition.