Range<Location> (@NotNull LocalVariable variable) { if (!(variable instanceof LocalVariableImpl variableImpl)) return null; return new Range<>(variableImpl.getScopeStart(), variableImpl.getScopeEnd()); }