Using multiple operators in INumber-constrained generic functions leads to compiler error
Open
Area-Compiler-Checking
Area-Compiler-SRTP
Bug
Impact-Medium
- Dominant language
- F#
- Stars
- 4.3k
- Forks
- 876
- Avg merge
- 4d 22h
- Merged PRs (30d)
- 144
Description
Please provide a succinct description of the issue.
```fsharp
// ok
let numericOpsPlus<'T when INumber<'T>>(num: 'T) =
num + num
// FS0670 - code is not sufficiently generic
let numericOpsPlusPlus<'T when INumber<'T>>(num: 'T) =
num + num + num
// ok again
let inline numericOpsPlusPlusInlined<'T when INumber<'T>>(num: 'T) =
num + num + num
```
Contributor guide
Assessment
This issue has not been assessed yet.