I know that the implementation of inline code can't use internal/private code. However, it also seems, surprisingly to me, that I can't even pass internal types to inlined functions using SRTP (statically resolved type parameters).
Consider this:
type internal A = { A: int }
let inline f (x: ^a) =
(^a: (member A: _) x)
let a = { A = 0 }
let x = f a
It fails with a compile error on the last a:
Removing internal from the definition of A fixes the error.
Is this intentional? Is there any way to make this work while keeping A internal, apart from copying to an anonymous record (e.g. replacing a with {| a with __ = () |})?
