Header menu logo G-Research F# Analyzers

TypedInterpolatedStrings Analyzer

Using interpolated strings can catch you off guard when refactoring types.

Problem

let v = 1 // Changing the type won't affect `s`
let s = $"{v}"

Fix

Add an explicit type format:

let v = 1 // Changing the type will affect `s`
let s = $"%i{v}"
val v: int
val s: string

Type something to start searching.