Weird issue w/String

Actually, think I found the bug. The build combines both the setting and a check if the external compile tis valid. the resolve, which is separate, just checked the setting, and if set, would nit resolve the internal references. Will fix (post .2365, which is building right now).

1 Like

FYI, the IDE keeps autocorrecting the .Length to .length (as mentioned a few replies up). Obviously, .length causes a compilation error afterwardsā€¦ :roll_eyes:

I disabled W0 and E464 to get around this (W0 seems to be the one messing with my code, although my code is Silver). Now Iā€™m getting a ā€œCase does not match ā€œlengthā€ā€ warning

Define auto-correcting. when you build, via a Auto-Fix-It error message? or when you type, using CC? If the latter, is that before or after the reference issue got fixed (which I assume fixed Peek at Definition, too?)

It replaces .Length with .length when the build completes. This seems to be controlled by the W0 checkbox in Fireā€™s settings. Code completion correctly provides me with Length as a valid member of String.

Odd. So you have .Length, you compile, it succeeds (with an ā€œignored & fixed errorā€) and changes the code to .length, and then the next compile fails? Or does the very compile that auto-fixes it fail (if so, do you have "Treat Fixable Errors as Warnings disabled in Preferences (itā€™s on by default)?

Either way, itā€™s odd. if the compiler sees RTL2, it should see .Length. Iā€™ll check in a bit, here.

Yes, this is what happens.

Treat fixable errors as warnings is enabled
if W0 and E464 are checked i just get a grey ā€œ[FIXED] ā€¦ā€ message next to that line as it replaced .Length with .length. Then, obviously, the next build fails, complaining about .length (ā€œNo such memberā€)
If W0 and E464 are unchecked i just get a warning that says ā€œCase does not match ā€œlengthā€ā€.

Fixed.

Can I get a new test case, because the one you have me didnā€™t have .length, only .isEmpty.

Iā€™ve added a line

        _ = classlibrary.SomeClass().stringValue.Length

but that one does not trigger the issue (for me)

Trying to reproduce this with a small test case. Not having success so far.

:stuck_out_tongue_winking_eye:

No idea why, but I canā€™t seem to reproduce this as a simplified test case. Iā€™ll keep plugging at it but I may just wait for 2365 to see if any of the other fixes affect this, somewhat.

I doubt that 2365 (out now) will change anything here.

It wonā€™t but there are other issues that, once cleared up, should help me extract a smaller test case.

1 Like