You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ dub.exe cb.d
cb.d(10,19): Error: cannot implicitly convert expression opCall(((Buffer!(char, false) __tmpfordtor7 = opCall();) , __tmpfordtor7).buf) of type Buffer!(char, fal
se) to shared(Buffer!(char, false))
cb.d(10,19): bufchar = opCall(((Buffer!(char, false) __tmpfordtor7 = opCall();) , __tmpfordtor7).buf) is the first assignment of bufchar therefore it repr
esents its initialization
cb.d(10,19): opAssign methods are not used for initialization, but for subsequent assignments
cb.d(11,9): Error: array equality comparison type mismatch, shared(char[]) vs string
C:\project\dmd2\windows\bin64\dmd.exe failed with exit code 1.
The text was updated successfully, but these errors were encountered:
There is no implicit conversion from mutable to shared, you will have to explicitly cast it. I assume that with arrays, they are made constant, then immutable and finally shared to be able to be implicit. I've been testing methods of implementing implicit conversion, but have yet to find any success.
Here is an example on how to make the buffer shared. I'll be adding some docs later on as well. 31a11ab
$ cat cb.d
compile error:
The text was updated successfully, but these errors were encountered: