Skip to content

Overloads

module Overloads
AssemblyXantham.Generator

Functions and values

dedupeOverloads: Pass<ShapeModel>

Overloads that widened into the same F# signature are duplicates the compiler rejects - .NET overload resolution sees through type abbreviations and ignores return types. The first survives; the rest drop with a finding.

A literal-typed parameter keeps its literal as a type of its own where that is what separates an overload set (Spec.literalOverloads), so those signatures arrive here distinct. The types they read are declared beside them.

Retention reads the members of a declaration, so an exported function's overloads arrive widened and its drops report DO004 apart from DO001.

A set separated in TypeScript by a keyof bound alone reaches F# as one signature, since .NET keeps constraints out of a method signature (Spec.keyBoundedOverloads). Those drops report DO005.