anchor.diff:              typeof<Double>; typeof<Boolean>; typeof<Char>
           ]
   
  -    let private objectReferenceEquals =
  -        dottedMemberAccess' ["object"; "ReferenceEquals"]
  +    let private assertValueIsInterned info expr =
  +        invocation MemberAccess.debugAssert
  +            [|
  +                or'
  +                    (equals expr Literal.Null)
  +                    (invocation MemberAccess.stringIsInterned [| expr |])
  +                Literal.String "Value should always be interned if interning is enabled"
  +            |]
  +            |> statement
  +    
  +    let inline private assertValueIsInternedIfNeeded info expr method =
  +        (|?>) method (internEnabled info, addBodyStatement (assertValueIsInterned info expr))
   
       /// Call the most adapted underlying equals method between underlying-typed expressions.
       let private underlyingEquals info exprA exprB eq enableInterning =
           if enableInterning && internEnabled info then
               // Both should be interned strings, so we can use obj.ReferenceEquals
  -            let refEquals = invocation objectReferenceEquals [|exprA; exprB|]
  +            let refEquals = invocation MemberAccess.objectReferenceEquals [|exprA; exprB|]
               if eq then
                   refEquals :> ExpressionSyntax
               else
  
positive.code:                 notIs info.GeneratedTypeSyntax :> ExpressionSyntax
          let returnFalseForIncorrectType = if' incorrectTypeCondition (block [|ret Literal.False|])
  
          let returnArgCastToUnderlyingEqualsValue = 
              ret (thisValueEquals info (parameter |> cast info.UnderlyingTypeSyntax) true true)
  
          let ifIsUnderlyingReturnEquals =
              if'
  
negative.code:         |> addModifiers [|SyntaxKind.PublicKeyword; SyntaxKind.StaticKeyword|]
          |> addParameter "a" info.GeneratedTypeSyntax
          |> addParameter "b" info.GeneratedTypeSyntax
          |> assertValueIsInternedIfNeeded info (value parameterA)
          |> assertValueIsInternedIfNeeded info (value parameterB)
          |> addBodyStatement body
  
      let private makeEquals info =
  