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
Falls back to the “lowest common ancestor” type and returns type of A.
Actual result:
Could not determine types of x and y, use explicit types.
Example usage
Class A could for example represent the natural numbers, B could be powers of two and C could be powers of three. Then you would implement a method Multiply such that a product of two powers of two would also be a power of two, a product of two powers of three would be another power of three and all other combinations would return a natural number – neither a power of two, nor a power of three.
If inferencing worked as I expected, you could simply write:
This behavior is not limited to multiplying powers of two and three, it can be found in many other parts of mathematics (for example k-grades of a multivector are sets closed under addition). And I believe it has uses in many other fields other than maths. I believe this issue should be addressed as a part of #98.
The text was updated successfully, but these errors were encountered:
Input code:
Expected result:
Falls back to the “lowest common ancestor” type and returns type of
A
.Actual result:
Could not determine types of
x
andy
, use explicit types.Example usage
Class
A
could for example represent the natural numbers,B
could be powers of two andC
could be powers of three. Then you would implement a methodMultiply
such that a product of two powers of two would also be a power of two, a product of two powers of three would be another power of three and all other combinations would return a natural number – neither a power of two, nor a power of three.If inferencing worked as I expected, you could simply write:
Conclusion
This behavior is not limited to multiplying powers of two and three, it can be found in many other parts of mathematics (for example k-grades of a multivector are sets closed under addition). And I believe it has uses in many other fields other than maths. I believe this issue should be addressed as a part of #98.
The text was updated successfully, but these errors were encountered: