range shortened method not enabled, compile with compiler switch `-preview=shortenedMethods`
Joe at bloow.edu
Joe at bloow.edu
Sun Sep 24 19:51:06 UTC 2023
On Sunday, 24 September 2023 at 12:59:57 UTC, Steven
Schveighoffer wrote:
> On Sunday, 24 September 2023 at 10:00:31 UTC, Joe wrote:
>> For absolutely no reason I started getting this error.
>>
>> Last night I compiled the project and it worked just fine.
>> This morning I made a single insignificant change and tried to
>> compile and got that error. Only possible thing is that for
>> some reason some change in updating the compiler may have no
>> propagated correctly till after the reboot.
>>
>> [...]
>
> This sounds like a compiler issue. Are you on the latest
> compiler? Which compiler? Is there a set of code you can post
> or upload which causes the problem?
>
> -Steve
I accidentally deleted my D folder containing the compiler and
other things. (It as a weird issue where I was trying to add a
command to an app and because the %1 parameter didn't have quotes
I guess it deleted the D folder as it shortened it to D) I had a
backup and didn't change anything since then except for updating
the compilers. Still had the same visual D version.
So I copied it over and updated dmd with visual D. Everything
worked fine that day and I messed with the code several times.
Woke up and wanted to make a simple change and code would not
compile. The changes were insignificant. It gave me that error
and when I added that switch then I got one about
pragma(crt_constuctor) needing extern(C). Anyways, tried adding
the extern(C) in the code but it wouldn't accept the changes.
BUT I just tried to compile it again and no issues.
Probably drive corruption issues or possibly some type of caching
issue.
But I was able to make changes now and compile it like it should
work.
E.g., it's possible that when I copied over the old D directory
that it had an old compiler(I think it was from '22). I did
update with visual D but maybe there was caching going on that
was causing the conflict.
In any case everything seems to be back to normal. I really
didn't do much to fix anything so it was probably all caused by
deleting that D folder accidentally.
More information about the Digitalmars-d-learn
mailing list