extern(C) Variant: attempting to use incompatible types int and int

2020-11-15 Thread frame via Digitalmars-d-learn
I know the problem that TypeInfo != TypeInfo in main and library context. Is there are a hack to get the data from the Variant even if the TypeInfo-check fails? I assume the only workaround is using an own struct or serializer to achieve the same functionality?

Re: Error: incompatible types for 'shared(SysTime)' and 'shared(SysTime)'

2018-09-14 Thread Arafel via Digitalmars-d-learn
On 09/13/2018 06:59 PM, ag0aep6g wrote: On 09/13/2018 03:25 PM, Arafel wrote: // How can we update the timestamp? Neither of those work timestamp = Clock.currTime; timestamp = cast(shared) Clock.currTime; cast() timestamp = Clock.currTime; Still not there... it

Re: Error: incompatible types for 'shared(SysTime)' and 'shared(SysTime)'

2018-09-14 Thread Arafel via Digitalmars-d-learn
(*(cast (SysTime*) ())).foo; Not exactly obvious or user-friendly...

Re: Error: incompatible types for 'shared(SysTime)' and 'shared(SysTime)'

2018-09-13 Thread ag0aep6g via Digitalmars-d-learn
On 09/13/2018 03:25 PM, Arafel wrote:     // How can we update the timestamp? Neither of those work     timestamp = Clock.currTime;     timestamp = cast(shared) Clock.currTime; cast() timestamp = Clock.currTime;

Re: Error: incompatible types for 'shared(SysTime)' and 'shared(SysTime)'

2018-09-13 Thread Arafel via Digitalmars-d-learn
On 07/05/2016 04:16 PM, ag0aep6g wrote: On 07/05/2016 07:25 AM, ketmar wrote: cast `shared` away. yes, this is how you supposed to use it now: cast it away. after having ensured thread safety that is Sorry to resurrect an old thread, but then how can one update a SysTime field in a shared

Re: Can't "is null" an interface?!?! Incompatible types???

2018-03-08 Thread Jacob Carlborg via Digitalmars-d-learn
On Thursday, 8 March 2018 at 08:04:54 UTC, Nick Sabalausky (Abscissa) wrote: Interesting. I was using vibe.d 'v0.8.3-rc.1' (which doesn't appear to work on run.dlang.io). But it does seem to work for me if I use 'v0.8.3-alpha.1'. I wonder what could have changed to result in this? It's a

Re: Can't "is null" an interface?!?! Incompatible types???

2018-03-08 Thread Nick Sabalausky (Abscissa) via Digitalmars-d-learn
On 03/08/2018 03:04 AM, Nick Sabalausky (Abscissa) wrote: Interesting. I was using vibe.d 'v0.8.3-rc.1' (which doesn't appear to work on run.dlang.io). But it does seem to work for me if I use 'v0.8.3-alpha.1'. I wonder what could have changed to result in this?

Re: Can't "is null" an interface?!?! Incompatible types???

2018-03-08 Thread Nick Sabalausky (Abscissa) via Digitalmars-d-learn
On 03/08/2018 01:13 AM, Nicholas Wilson wrote: That does seem odd. --- /+dub.sdl: dependency "vibe-d" version="~>0.8.3-alpha.1" +/ import vibe.core.net; import std.stdio; TCPConnection mySocket; void main() {     auto b = mySocket is null;     writeln(b); } --- works fine on run.dlang.io

Re: Can't "is null" an interface?!?! Incompatible types???

2018-03-07 Thread Nicholas Wilson via Digitalmars-d-learn
On Thursday, 8 March 2018 at 04:48:08 UTC, Nick Sabalausky (Abscissa) wrote: - import vibe.core.net; TCPConnection mySocket; void main() { auto b = mySocket is null; } - That's giving me: - Error: incompatible types for (mySocket

Can't "is null" an interface?!?! Incompatible types???

2018-03-07 Thread Nick Sabalausky (Abscissa) via Digitalmars-d-learn
- import vibe.core.net; TCPConnection mySocket; void main() { auto b = mySocket is null; } - That's giving me: - Error: incompatible types for (mySocket) is (null): TCPConnection and typeof(null) - WTF

Re: Error: incompatible types for 'shared(SysTime)' and 'shared(SysTime)'

2016-07-05 Thread ag0aep6g via Digitalmars-d-learn
On 07/05/2016 07:25 AM, ketmar wrote: cast `shared` away. yes, this is how you supposed to use it now: cast it away. after having ensured thread safety that is

Re: Error: incompatible types for 'shared(SysTime)' and 'shared(SysTime)'

2016-07-04 Thread ketmar via Digitalmars-d-learn
On Monday, 4 July 2016 at 20:54:53 UTC, Luke Picardo wrote: if (curTime - lastMsgTime).total!"seconds") ... Both are shared Durations. also when I try to do lastMsgTime = curTime; Gives me Error: non-shared method std.datetime.SysTime.opAssign is not callable using a shared object. cast

Error: incompatible types for 'shared(SysTime)' and 'shared(SysTime)'

2016-07-04 Thread Luke Picardo via Digitalmars-d-learn
if (curTime - lastMsgTime).total!"seconds") ... Both are shared Durations. also when I try to do lastMsgTime = curTime; Gives me Error: non-shared method std.datetime.SysTime.opAssign is not callable using a shared object.

Re: lovely compiler error message - incompatible types

2015-07-02 Thread Justin Whear via Digitalmars-d-learn
On Thu, 02 Jul 2015 17:33:28 +, Laeeth Isharc wrote: FixedDecimal is a fixed decimal point struct that stores values as an int or long and takes number of decimal places as the second compile term argument. It's possible, if not likely I have made a mistake in implementing operator

Re: lovely compiler error message - incompatible types

2015-07-02 Thread anonymous via Digitalmars-d-learn
On Thursday, 2 July 2015 at 17:33:29 UTC, Laeeth Isharc wrote: Any thoughts on what could be leading to the following: ./../../marketdata/source/pricebar.d(397): Error: incompatible types for ((bar.high) + (bar.low)): 'FixedDecimal!(int, 8)' and 'FixedDecimal!(int, 8)' ../../../marketdata

Re: lovely compiler error message - incompatible types

2015-07-02 Thread Steven Schveighoffer via Digitalmars-d-learn
On 7/2/15 1:33 PM, Laeeth Isharc wrote: Hi. It's not easy to reduce, but I will have a go if other options fail. Any thoughts on what could be leading to the following: ../../../marketdata/source/pricebar.d(397): Error: incompatible types for ((bar.high) + (bar.low)): 'FixedDecimal!(int, 8

lovely compiler error message - incompatible types

2015-07-02 Thread Laeeth Isharc via Digitalmars-d-learn
Hi. It's not easy to reduce, but I will have a go if other options fail. Any thoughts on what could be leading to the following: ./../../marketdata/source/pricebar.d(397): Error: incompatible types for ((bar.high) + (bar.low)): 'FixedDecimal!(int, 8)' and 'FixedDecimal!(int, 8

Re: lovely compiler error message - incompatible types

2015-07-02 Thread Laeeth Isharc via Digitalmars-d-learn
: incompatible types for ((bar.high) + (bar.low)): 'FixedDecimal!(int, 8)' and 'FixedDecimal!(int, 8)' .../../../marketdata/source/pricebar.d(399): Error: incompatible types for ((bar.high) + (bar.low)): 'FixedDecimal!(int, 8)' and 'FixedDecimal!(int, 8)' .../../../marketdata/source/pricebar.d(547

Re: lovely compiler error message - incompatible types

2015-07-02 Thread Laeeth Isharc via Digitalmars-d-learn
Can you post the signature to the operator overload? I have an idea of what it might be, but it's difficult to explain without context. -Steve https://gist.github.com/Laeeth/6251fa731e4cee84bcdc not really a proper implementation. I wanted something as a placeholder today that I could

Re: lovely compiler error message - incompatible types

2015-07-02 Thread Justin Whear via Digitalmars-d-learn
On Thu, 02 Jul 2015 21:03:37 +, Laeeth Isharc wrote: Can you post the signature to the operator overload? I have an idea of what it might be, but it's difficult to explain without context. -Steve https://gist.github.com/Laeeth/6251fa731e4cee84bcdc not really a proper implementation.

Re: lovely compiler error message - incompatible types

2015-07-02 Thread Laeeth Isharc via Digitalmars-d-learn
On Thursday, 2 July 2015 at 21:19:19 UTC, Justin Whear wrote: On Thu, 02 Jul 2015 21:03:37 +, Laeeth Isharc wrote: Can you post the signature to the operator overload? I have an idea of what it might be, but it's difficult to explain without context. -Steve

Re: incompatible types!

2011-04-07 Thread Steven Schveighoffer
On Wed, 06 Apr 2011 12:32:37 -0400, simendsjo simen.end...@pandavre.com wrote: Both the d1 and d2 homepage states the following: There are two versions of the language: 1. D version 1 which is in maintenance mode. 2. D version 2 which is recommended for new projects. Should it mention

Re: incompatible types!

2011-04-06 Thread simendsjo
On 06.04.2011 02:15, Steven Schveighoffer wrote: On Tue, 05 Apr 2011 19:37:15 -0400, Caligo iteronve...@gmail.com wrote: It's just frustrating, that's all. Writing thousands of lines of code and having everything stop because of a compiler bug is just frustrating. I completely understand.

Re: incompatible types!

2011-04-05 Thread Philippe Sigaud
What's strange is that auto r3 = r1 + r2; works. Bug indeed...

Re: incompatible types!

2011-04-05 Thread Steven Schveighoffer
On Tue, 05 Apr 2011 15:48:36 -0400, Caligo iteronve...@gmail.com wrote: I searched the bugzilla and there are 'alias this' related bugs. Some of them are 2 years old and have not been fixed. There are many bugs in that category. inout I think is a prime example. I don't really know what to

Re: incompatible types!

2011-04-05 Thread Caligo
It's just frustrating, that's all. Writing thousands of lines of code and having everything stop because of a compiler bug is just frustrating. I know progress is being made, and all that is appreciated. But, I don't remember ever hearing anything about D2 being in beta. If anything, I

Re: incompatible types!

2011-04-05 Thread Steven Schveighoffer
On Tue, 05 Apr 2011 19:37:15 -0400, Caligo iteronve...@gmail.com wrote: It's just frustrating, that's all. Writing thousands of lines of code and having everything stop because of a compiler bug is just frustrating. I completely understand. It's why I have to periodically stop using D.

Re: incompatible types!

2011-04-05 Thread Jonathan M Davis
On Tue, 05 Apr 2011 19:37:15 -0400, Caligo iteronve...@gmail.com wrote: It's just frustrating, that's all. Writing thousands of lines of code and having everything stop because of a compiler bug is just frustrating. I completely understand. It's why I have to periodically stop using D.