F#SRTP错误消息:类型约束不足?

时间:2019-05-03 08:05:55

标签: f#

我在^G * ^G -> ^G的乘法运算符上收到“ ...缺少类型约束...”错误消息,即使该约束已添加并且正在调用者类型(^ G)上实现。同样非常奇怪的是错误消息的后半部分“或”后面的内容:

when (^G or ^?299125) : (static member ( * ): ^G * ^?299125 -> ^G

但是,表达式的左手侧和右手侧都是^ G类型(又名BigRational)。我想知道为什么F#认为它是^?299125

screenshot of the error exact message and its location being marked

0 个答案:

没有答案