Augmenting refined types results in an internal error
Repro steps
[<MeasureAnnotatedAbbreviation>]
type BigInteger<[<Measure>]'M> = System.Numerics.BigInteger with
static member inline op_Explicit(x : BigInteger<'M>) : System.Numerics.BigInteger = Unchecked.defaultof<_>
Expected behavior
The code should be either parsed as valid, defining a refined type with additional usable members, or it should be properly rejected.
Actual behavior
The code is successfully parsed, but code generation results in
error FS0192: internal error: FindTypeDefBuilder: System.Numerics.BigInteger not found
Known workarounds
Can't think of any workarounds to add members to a refined type that would work in similar contexts normal members do (like SRTPs).
Related information
Tested on 9.0.300 and earlier.
Example: https://sharplab.io/#v2:DYLgZgzgPg2gPAWQKYEMIFcBOSCCA7PAewBcVikATHAI2uwDcBLMxwvAPgF0BYAKGICeAByQACAEKMA5gEk85KUkxx4yNFiRcA5AnaiAvKIDKAiOQC2AOgBy6c0sYBjCJcmz5SRZlEB3RsQALPlFRMxZHUXtzaiVRRjxgeLFCIQB9AFEADyFEx38ACkzREAlpOQUlOB12AEpi41MLGzsHZ1cyjy8DUQBVPEcApEcAa0pLCiQwFHRgYkIwOFT2PiA