Page 1 of 1

Incompatible types

Posted: 14 Nov 2022 20:25
by Martin Meyer
Hello Thomas,

on attached example the compiler throws "The expression has type 'arrayP::repDomain', which is incompatible with the type 'arrayP::repDomain{@ItemType}'". Is it a bug?

Re: Incompatible types

Posted: 15 Nov 2022 12:45
by Thomas Linder Puls
It is a bug. Actually, this bug turns up over and over in different contexts, but I guess that it will eventually be solved for all contexts.

The usual work-around also helps in this case. Redefine your domains like this:

Code: Select all

domains     repDomain{T} = repDomain(arrayM{T} ArM, recoverableState State).
And change all other occurrences of repDomain to repDomain{@ItemType}.