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
First, the or in TSignalData is being treated as a normal logical or (ie ||) instead of the contract combinator or. This is basically the same bug as in #38.
But, even if there wasn't a bug this still isn't a valid contract. The problem is you can't have two "higher-order" contracts in an or. Since both the function and the object have delayed behavior, there's no way to check them both. So we have to disallow more than one higher-order contract in an or combinator.
So when the #38 bug is fixed you'll get an error message saying "Error: Cannot have more than 1 higher order contract in 'or'" which is correct.
Wait...what I said was wrong. Turns out we actually can and should allow a function and an object in an or combinator. Easy to distinguish the cases by typeof. Where it falls apart is multiple higher-order functions which we still can't allow.
Object and function contracts conflicts when used in OR. Both tests should pass.
The text was updated successfully, but these errors were encountered: