Open TysonMN opened 4 years ago
This does seem like a bug, here is another example that is smaller but has the same issue:
type Test<'a> =
{ x: 'a } with
static member inline (/) (m, s) = { x = m.x / s; }
let inline determinant m = m.x
let inline inverse m = { x = m.x } / (determinant m)
I'd imagine this is fixed in feature/ext branch, we should check
Smaller repro:
type Matrix<'a> = { m11: 'a }
static member inline (/) (m: Matrix<'b>, s) = { m11 = m.m11 / s }
let inline inverse (m: Matrix<'a>) = m / m
Succinct description of the issue
I found a case involving a few inline functions/operators and many statically resolved type parameters for which the compiler cannot found a solution.
Steps required to reproduce the problem
Consider this code.
ZIP of solution containing that code.
Expected behavior
The code compiles.
Actual behavior
The codes doesn't compile. Here is the build output.
Known workarounds
Add more type annotations...specifically by commenting in the commented out line (and then commenting out the line it replaces).
Related information