Header menu logo ionide-analyzers

EqualsNullAnalyzer

Using = or <> to compare with null produces less optimal IL code.

Problem

let a = obj()
// Analyzer will trigger
a = null

Fix

isNull a

Code fix

This analyzer has a code fix for Ionide:

code fix for EqualsNullAnalyzer

val a: obj
type obj = System.Object
val isNull: value: 'T -> bool (requires 'T: null)

Type something to start searching.