Closed Stevefb closed 5 years ago
That's the type-hint character for a LongLong
literal.
In order to "fix" this (could be part of the "autocorrect" future AC feature), we would have to assume that our users never want to use a type hint, or are willing to explicitly backspace/delete the extra whitespace Rubberduck would be adding before the operator.
Thoughts?
As per chat: While this is something that Rubberduck could fix, it's not clear that the behaviour outlined here is always the desired behaviour. In the end this boils down to the following:
Rubberduck shouldn't be guessing what the user wants, it should know. The currently proposed feature referst to an ambiguity in expressed intention, that can be resolved in two different ways. As such I think this is well-intentioned, but not something that Rubberduck should interfere with
As a reference, we observe a similar (but not identical) anomaly with syntax like 2&2
, which results in a compiler error; it always has been necessary to explicitly type spaces around the &
character even though that is not true of say, +
character. For that reason, I think users are best served if they are trained to remember to space the ^
just as they do the &
as opposed to fighting with the unwanted mutations where they really meant to use it as a typehint or as a power operator.
Stumbled across this anomaly in 64 bit VBA: https://stackoverflow.com/a/52360094/3451115
Basically auto-correct for
2^2
becomes2^; 2
instead of2 ^ 2
this is a VBA IDE issue (not RD) and is specific to 64 bit.