range shortened method not enabled, compile with compiler switch `-preview=shortenedMethods`

Joe at bloow.edu Joe at bloow.edu
Sun Sep 24 10:00:31 UTC 2023


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.

when I add the switch I then get.

function `core.time.TickDuration.time_initializer` must be 
`extern(C)` for `pragma(crt_constructor)`

dmd-2.105.2


EVERYTHING was working fine yesterday. All I did today was load 
up the project and change an integer value and I couldn't compile 
it ;/

Maybe corruption somewhere, I don't know.

Anyways, I added extern(C) to that method in the location it says 
the file exists but no change. I removed the pragma, no change. 
Doesn't seem to actually be using that file.

I have no idea what is going on. All I can do is try to reinstall 
the compiler and maybe redo the dub package. I'm using visual D + 
vibe.d + dub. Nothing fancy.


More information about the Digitalmars-d-learn mailing list