Skip to content

Diagnostics

Every diagnostic the E# compiler emits — 213 codes, grounded in the binder/emitter source. 40 carry negative-test coverage in the corpus; each links to the verified .es programs that provoke it, so the test suite is browsable by diagnostic. The IL compiler is the source of truth — unverifiable IL surfaces as ES0900 at build time rather than a run-time InvalidProgramException.

Numbering is grouped by phase: ES0xxx resolution / verification · ES1xxx declarations & const · ES2xxx types, pointers, inheritance, events, names · ES3xxx async-let & struct construction · ES4xxx style warnings · ES8xxx performance warnings · ES9xxx workspace / fusion crashes. Gaps in the sequence are unused codes.

CodeSeverityTriggerExamples
ES0001 Error Fallback diagnostic — an unresolved type, method, or variable, or a backend resolution failure (e.g. IL: unresolved indexer). 0
ES0002 Warning The ad-hoc warning sink — a warning from a call site that does not yet carry a named descriptor. 0
ES0003 Info The ad-hoc info sink, the informational counterpart of ES0001. 0
ES0004 Hidden The ad-hoc hidden sink — surfaced to tooling, not to a build log. 0
ES0900 Error Emitted IL failed ILVerify — surfaced at build time (project / Workspace path) instead of as a run-time InvalidProgramException, naming the offending Type::Method. 1
ES1010 Error A top-level statement appears in a static facet body, which may hold only fields, const, and func declarations. 2
ES1011 Error A const initializer does not fold to a compile-time literal. 0
ES1013 Error A label appears on a parenthesized expression, which is not a tuple. 0
ES1016 Error A positional struct declares a body, which the positional header does not take. 0
ES1017 Error out let is not a form — an out argument is written by the callee. 0
ES1018 Error A computed property (let x => e) has no explicit result type, and there is no initializer to infer one from. 0
ES1014 Error An attribute is attached to a member form that cannot carry one. 0
ES1015 Error An attribute names no attribute type, or no constructor matching the arguments given. 0
ES2002 Error A value struct field references the type directly (or via a generic container) — the struct would be infinitely large. 5
ES2003 Error *Class or new Class — illegal, a class is already a reference. 3
ES2004 Error A removed [Struct] / [Class] attribute. These pinned the CLR form back when one keyword covered both, and they are no longer part of the language. 0
ES2030 Error A managed pointer alias crosses a durable boundary but has not been realized as a heap cell. 0
ES2120 Error A plain func has the same name as a virtual/abstract member on the base type. 1
ES2121 Error A : func marker has no body in a concrete (non-abstract) subclass. 1
ES2122 Error A : func marker matches no virtual/abstract member on the inheritance chain. 1
ES2123 Error A : func marker targets a parent member that is neither virtual nor abstract. 0
ES2124 Error A : prefix is used in a class that declares no base type or interface. 1
ES2125 Error An abstract func is declared outside an abstract class. 1
ES2126 Error A virtual func is declared on a sealed class (sealed is the default). 1
ES2127 Error An enum C: T { ... } names an underlying type that is not a CLR integral primitive. 0
ES2128 Error A : base(...) call’s argument count does not match the base init signature. 2
ES2129 Error A visibility prefix precedes the : inheritance marker. 0
ES2130 Error A var is captured by a function literal across a task func boundary. 3
ES2131 Error yield appears outside a function whose return type is IAsyncEnumerable<T>. 0
ES2132 Error A method receiver names a closed generic instantiation, such as func (h: Holder<int>) get(). 0
ES2133 Error An override returns a different type from the member it overrides. 0
ES2140 Error Two triggers: (a) an event is declared on a non-class (events imply identity); (b) a non-void function does not return on every path. 1
ES2141 Error An event is typed by something that is not a delegate. 0
ES2142 Error Two triggers: (a) a value-receiver method is called as a free function (bump(v) instead of v.bump()); (b) raise names an event not declared on the enclosing class. 2
ES2143 Warning The deprecated &T { ... } heap-allocation spelling. 1
ES2144 Error new is applied to a non-struct type; it heap-allocates a value struct into a *T. 3
ES2145 Error Indexing ([...]) a non-indexable type (a struct, union, or enum). 5
ES2146 Error An undefined name — no local, parameter, function, type, or namespace by that name is in scope. 2
ES2147 Error A member access names something the receiver type does not have. 1
ES2148 Error A composite literal names a type the binder does not know. 1
ES2150 Error A bare type name lives in another namespace. 1
ES2151 Error A bare type name is ambiguous — visible from two in-scope/imported namespaces at once. 2
ES2152 Error A bare free-function name lives in another namespace. 1
ES2153 Warning A type structurally matches an interface it does not declare — conformance is nominal. 2
ES2154 Error A type name does not resolve — no type by that name is in scope. 0
ES2155 Warning A name resolved through the compiler process by reflection fallback rather than through the reference set. 0
ES2156 Error A call names a member the static facet does not declare — no function, field, or nested type by that name. 0
ES2160 Error A type name is not PascalCase. 3
ES2161 Error A free-function name is not camelCase. 0
ES2170 Error A match is not exhaustive. The message lists the missing cases. 0
ES2171 Warning A default arm is unreachable because the cases already cover the subject. 0
ES2172 Error A union or enum is matched by a type pattern. Both are closed types. 1
ES2173 Error A smart-cast narrow cannot be proven stable at this point. 2
ES2174 Error A nil arm matches a non-nullable subject, so it can never match. 0
ES2180 Error A default argument does not fold to a constant shape. 4
ES2181 Error A positional argument follows a named argument. 1
ES2182 Error A named argument names no parameter of the callee. 1
ES2183 Error The argument count does not match any arity the callee accepts. 1
ES2184 Error One parameter is supplied more than once — positionally and by name, or named twice. 1
ES2185 Error A type declares two init members with the same parameter count. 2
ES2186 Error A secondary init on a class with a capture header does not delegate to the primary. 1
ES2187 Error An init delegation chain forms a cycle, including an init that delegates to itself. 2
ES2188 Error A capture-header parameter has the same name as a declared field. 1
ES2189 Error A composite literal omits a required field. 2
ES2190 Error A composite literal constructs a class that has a capture header. 1
ES2191 Error ? is applied to something that is not a Result<T, E>. 0
ES2192 Error A type inherits from a sealed type. 0
ES2193 Error A stored let x { } property is declared on a value struct, which has no init to write through it. 0
ES2194 Error A type argument cannot be inferred. Inference does not flow from the expected type. 0
ES2195 Error An init carries pub. A constructor is public by default. 0
ES2196 Error An unexpected token appears in a property accessor block. 0
ES2197 Error An if used as a value has no else. 0
ES2198 Error The branches of an if-expression yield different types. 0
ES2199 Error An if-expression branch does not end in a value expression. 0
ES2201 Error A loca or mut capability does not directly name stable storage. 0
ES2202 Error A property declares more than one mut accessor. 0
ES2205 Error A namespace init carries a visibility modifier or attribute. 0
ES2206 Error More than one init block is declared for the same namespace across the compilation. 0
ES2207 Error return appears in a namespace init block. 0
ES2208 Error Suspending work (await, await for, or async let) appears directly in a namespace init. 0
ES2209 Error A namespace declares the same field or property state name more than once. 0
ES2210 Error The removed static func Foo spelling was used. 0
ES2211 Error A static Foo receiver names no declared static facet. 0
ES2212 Error A static receiver was marked readonly or pointer-shaped. 0
ES2213 Error yield &location appears outside a property mut accessor. 0
ES2214 Error A scoped mut accessor is declared on namespace state. 0
ES2215 Error A scoped mut property location attempts to escape its lend/resume region. 0
ES2216 Error One call attempts to borrow more than one scoped mut property. 0
ES2217 Error A scoped property borrow reached lowering without its property capability. 0
ES2218 Error A void scoped-borrowing call is used somewhere other than a statement. 0
ES2219 Error A scoped mut lend crosses await. 0
ES2220 Error return appears inside scoped mut. 0
ES2221 Error Scoped mut captures or spawns work from its lend region. 0
ES2222 Error Addressing a custom-set property would bypass its setter policy. 0
ES2223 Error A scoped mut accessor does not contain exactly one lend point. 0
ES2224 Error Scoped mut lends something other than an addressable local. 0
ES2225 Error The scoped mut working location has the wrong value type. 0
ES2226 Error A field is used to implement an interface property. 0
ES2227 Error var name: T => expression supplies a getter but no writable behavior. 0
ES2228 Error A var custom getter has no authored write behavior. 0
ES2229 Error A property accessor declares a visibility wider than the property’s own. 0
ES2230 Error A by-ref-like value is stored in a field. E# types are heap-capable, and a by-ref-like value may not reach the heap. 0
ES2231 Error A function returns a by-ref-like type. 0
ES2232 Error A by-ref-like value is live across an await. 0
ES2233 Error A by-ref-like value is captured by a function literal. 0
ES2234 Error A by-ref-like value is boxed. 0
ES2235 Error A native numeric conversion is not valid between these two types. 0
ES2236 Error A numeric literal does not fit the target type. 0
ES2237 Error A compiler directive is malformed. 0
ES2238 Error A @floatMode directive is duplicated or conflicts with another. 0
ES2239 Error A composite literal targets a type that declares a constructor, so it has no parameterless one to initialize through. 0
ES2240 Warning An un-awaited call to an async function blocks here until the result is ready (sync over async). 0
ES2241 Error @derive is written without its parenthesized list. 0
ES2242 Error @derive names a derive that is not registered. 0
ES2243 Error A derive is given arguments it does not take. 0
ES2244 Error A derive already generates what another derive in the same list generates. 0
ES2245 Error A with expression targets a value that cannot be copied. 0
ES2246 Error A derive argument is not a constant. 0
ES2260 Error An explicit awaitable is used where the operator needs a value. 0
ES2270 Error An operator function is outside an operand type’s companion static facet, or is declared as an instance operator. 0
ES2271 Error An operator function declares method type parameters or uses task/await/yield. 0
ES2272 Error An operator function has no explicit result or returns void. 0
ES2273 Error An operator function has the wrong number of explicit operands. 0
ES2274 Error An operator operand is optional, out, pointer-shaped, or by-reference. 0
ES2275 Error No explicit operand has the companion owner’s open type identity. 0
ES2276 Error A declared shift operator does not take int as its right operand. 0
ES2277 Error An equality or ordering operator does not return bool. 0
ES2278 Error The same owner declares a duplicate operator signature. 0
ES2279 Error A required comparison partner is missing or has different ordered parameter types. 0
ES2280 Error derive equality conflicts with an explicit ==/!= pair. 0
ES2281 Error More than one exact source or imported CLR operator is applicable. 0
ES2282 Error A derived compound operator result is not exactly assignable to its target. 0
ES2283 Error A primitive bitwise, complement, or shift expression has invalid operand types and no exact overload. 0
ES2284 Error A local is declared twice in one scope. 0
ES2285 Error A tuple element name does not exist on the tuple. 0
ES2286 Error An [assembly: ...] attribute is written inside a declaration or a body, where the target cannot mean anything. 0
ES2287 Error An [assembly: ...] attribute names no attribute type, or no constructor matching the arguments given. 0
ES2288 Error A bare lambda is passed where a System.Delegate or MulticastDelegate parameter is expected. The abstract base names no Invoke, so there is no signature to infer parameter types from. 0
ES2289 Error A receiver block is in the wrong position. Two triggers: (a) ext at namespace scope; (b) a receiver block inside a static facet that is not marked ext. 0
ES2290 Error An ext receiver names a static facet. An extension extends a value, and a static facet has none. 0
ES2291 Error An extension host merges into a same-named type declared beside it, so the emitted host is not a CLR static class and no other language can see the extension. 0
ES2292 Error A flag-set operation is written over something that is not a flag set, or over two different flag-set enums. @derive(flags) is also written on a declaration that is not an enum. 0
ES2293 Error A nonliteral numeric argument reaches a parameter of a different numeric type. E# has no implicit widening. 0
ES2294 Error A function literal produces one awaitable wrapper where the target delegate returns another. The wrappers are distinct types and do not convert. 0
ES2295 Error A private nested type is named from outside the type that declares it. 0
ES2296 Error A member is reached through an optional receiver. An optional does not become the proven type on its own. 0
ES2297 Error A match arm names a case the subject type does not have, so the arm can never be taken. 0
ES2298 Error An ext block holds a member kind it cannot carry. An extension has no per-receiver storage, so stored state, var, const, operators, and members that write their own receiver are refused. 0
ES2299 Error An ext block is written in a type body. An extension is detached by definition, so a type body cannot host one. 0
ES2301 Error A variable is read before it is definitely assigned on every path reaching the read. 0
ES2302 Error An out parameter is not definitely assigned on all return paths. 0
ES2900 Error A derive refused the type it was applied to. The provider states the reason. 0
ES2901 Error A synthesized member carries no source span, so it could never be evicted when its file changes. 0
ES2902 Error A synthesized member carries no member facts, so its accessibility and vtable role are undecided. 0
ES2903 Error A provider produced an instance member where the shape does not permit one. 0
ES2904 Error A synthesized member’s declared arity does not match its parameter list. 0
ES2905 Error A synthesized member has an untyped parameter, or no return type. 0
ES2906 Error A synthesized member is an explicit override of something that cannot be overridden. 0
ES2907 Error A provider produced a virtual member on a struct, which has no vtable. 0
ES2908 Error A provider produced a protected member on a struct, which cannot be inherited from. 0
ES2909 Error A provider marked a non-constructor RTSpecialName. 0
ES2910 Error Two derives generate the same member. 0
ES2911 Error The derives on a type have a circular dependency and cannot be ordered. 0
ES2920 Error A provider pack named in the project does not exist. 0
ES2921 Error A provider pack could not be loaded. 0
ES2922 Error A provider has no parameterless constructor, or threw while being constructed. 0
ES2923 Error Two packs declare a provider of one name. 0
ES2924 Error A type in a provider pack could not be loaded. 0
ES2930 Error An analyzer threw while inspecting, or while reporting its phases. 0
ES2931 Error An emitted unit has no name, or one analyzer emitted two units of one name. 0
ES2932 Error An analyzer emitted source at the body phase. Emission is a declaration-phase capability. 0
ES2933 Error An emitted unit’s path is absolute, or escapes the project directory. 0
ES2934 Error A finding has no id, or claims an id of ES followed by digits. 0
ES2935 Error An analyzer reported a finding against a file it was not inspecting. 0
ES2936 Error Two units were emitted to one path, or the path is already a unit in this compilation. 0
ES2938 Error Generated declarations did not settle: a provider is not deterministic across rounds. 0
ES2940 Error A delimited region has no matching }. 0
ES2941 Error No loaded template owns this region sigil. 0
ES2942 Error A region sigil is not followed by a body. 0
ES2943 Error A template produced a fragment of the wrong shape for the position it is written in. 0
ES2944 Error A region in value position produced other than exactly one expression. 0
ES2945 Error A template threw while parsing a region, or while reporting its positions. 0
ES2946 Error A region is written in a position its template does not accept. 0
ES2947 Error A template rejected the contents of its region. 0
ES2948 Error A derive is written at a site its provider does not accept. 0
ES2949 Error A top-level type has the same name as its namespace; that name is reserved for the namespace host class that holds free functions, consts, and state. 0
ES3004 Warning An async let initializer is a user function with no await; it is auto-wrapped in Task.Run for fan-out. 1
ES3005 Error An async let initializer is not a function call or awaitable expression. 0
ES3012 Error An init block is declared on a value-semantic struct, which has no constructors. 4
ES3013 Error At emit, a call names more than one emitted method with that name and argument count, and carries no resolved symbol to choose between them. 0
ES4001 Warning A binding shadows an enclosing binding of the same name; the outer one returns when this scope ends. 0
ES4002 Warning A tuple element label is ignored because the target type already names that element. 0
ES8001 Warning Passing a large value parameter copies the whole value. 0
ES8002 Warning A value receiver snapshots a large struct on every call. 0
ES8003 Warning Returning a large value copies it. 0
ES8004 Warning Boxing a value allocates an object. 0
ES8005 Warning A capturing function literal allocates a display class. 0
ES8006 Warning Enumeration goes through the generic IEnumerable path and may allocate an enumerator. 0
ES8007 Warning A pointer promotion allocates. 0
ES9001 Error Assembly fusion (ILRepack) of the E# and C# halves failed. 0
ES9002 Error The E# IL emission phase threw an unhandled exception. 0
ES9003 Error The C# half (Roslyn) emission threw an unhandled exception. 0
ES9010 Error A source file listed in the project is not on disk. 0
ES9500 Error An internal compiler error. A phase threw and the failure was located rather than surfaced as an opaque crash. 0
ES9501 Error An entity that is known to exist failed to resolve — a scope or context error hid it at this site. 0
ES9510 Error An emitted type declares an interface but provides no loadable implementation of one of its members. The runtime would reject it with TypeLoadException. 0
ES9511 Error An emitted generic instantiation uses a type argument that does not satisfy a constraint. The runtime would reject it with VerificationException. 0
ES9512 Error An emitted method is neither abstract nor extern yet carries no IL body. 0
ES9513 Error An emitted instantiable type declares an abstract member. 0
ES9514 Error An emitted override targets a slot on no interface the type implements and no base type, so the runtime cannot bind it at load. 0
ES9515 Error An emitted value type contains itself by value — an infinitely-sized layout. 0
ES9516 Error An emitted type declares one member twice with the same signature. 0
ES9517 Warning A type could not be resolved during emit and was erased to System.Object. The assembly loads, but the erasure is usually a latent mis-compile. 0

ES0001 error

Fallback diagnostic — an unresolved type, method, or variable, or a backend resolution failure (e.g. IL: unresolved indexer).

Fix. Most specific errors carry a higher code; ES0001 is the default sink. Usually a missing using, a typo, or an unresolvable member.

No corpus negative example yet.

ES0002 warning

The ad-hoc warning sink — a warning from a call site that does not yet carry a named descriptor.

Fix. Read the message; it is the whole diagnostic. The code itself carries no rule.

No corpus negative example yet.

ES0003 info

The ad-hoc info sink, the informational counterpart of ES0001.

Fix. Read the message; the code carries no rule of its own.

No corpus negative example yet.

ES0004 hidden

The ad-hoc hidden sink — surfaced to tooling, not to a build log.

Fix. Read the message; the code carries no rule of its own.

No corpus negative example yet.

ES0900 error

Emitted IL failed ILVerify — surfaced at build time (project / Workspace path) instead of as a run-time InvalidProgramException, naming the offending Type::Method.

Fix. Indicates a compiler bug or an unsupported construct producing malformed IL — report it with the named method.

Corpus (1): TypeGrammarTests__ParseError_GatesEmission

ES1010 error

A top-level statement appears in a static facet body, which may hold only fields, const, and func declarations.

Fix. Move the statement into a func.

Corpus (2): ILEmitterTests_StaticFunc__StaticFunc_RejectsTopLevelStatements · ILEmitterTests_StaticFunc__StaticFunc_RejectsBareReturn

ES1011 error

A const initializer does not fold to a compile-time literal.

Fix. Use let for a runtime value; const is for literals only.

No corpus negative example yet.

ES1013 error

A label appears on a parenthesized expression, which is not a tuple.

Fix. Remove the label, or add a second element so it is a tuple.

No corpus negative example yet.

ES1016 error

A positional struct declares a body, which the positional header does not take.

Fix. Attach members with receiver blocks at namespace scope, or use a field body instead of the positional header.

No corpus negative example yet.

ES1017 error

out let is not a form — an out argument is written by the callee.

Fix. Declare it with out var x.

No corpus negative example yet.

ES1018 error

A computed property (let x => e) has no explicit result type, and there is no initializer to infer one from.

Fix. Write the type: let x: T => e.

No corpus negative example yet.

ES1014 error

An attribute is attached to a member form that cannot carry one.

Fix. Attach it to a method, or move the member out of the attribute’s way.

No corpus negative example yet.

ES1015 error

An attribute names no attribute type, or no constructor matching the arguments given.

Fix. Check the attribute name, its using, and the argument list against the constructor.

No corpus negative example yet.

ES2002 error

A value struct field references the type directly (or via a generic container) — the struct would be infinitely large.

Fix. Break the cycle with a pointer: next: *Node (or List<*Tree>).

Corpus (5): DataContractTests__RecursiveField_DirectSelfReference_Errors · DataContractTests__RecursiveField_PointerForm_Ok · DataContractTests__RecursiveField_InGenericContainer_Errors · DataContractTests__RecursiveField_ListOfPointer_Ok · DataContractTests__RecursiveField_RefDataAllowsSelfReference

ES2003 error

*Class or new Class — illegal, a class is already a reference.

Fix. Drop the *; construct it bare (Conn { ... }, no new).

Corpus (3): ILEmitterTests_HeapPointer__HeapPointer_StarRefData_Error · ILEmitterTests_New__Neg_NewRefData_IsES2003 · ILEmitterTests_PointerModel__StarRefData_IsError

ES2004 error

A removed [Struct] / [Class] attribute. These pinned the CLR form back when one keyword covered both, and they are no longer part of the language.

Fix. Remove the attribute. struct is a value type and class is a reference type — change the declaration keyword if the other form was meant.

No corpus negative example yet.

ES2030 error

A managed pointer alias crosses a durable boundary but has not been realized as a heap cell.

Fix. Keep the borrow frame-local, or pass/return a durable *T address at the boundary. This is a compiler safety diagnostic, emitted before invalid IL.

No corpus negative example yet.

ES2120 error

A plain func has the same name as a virtual/abstract member on the base type.

Fix. Prefix with : to override, or rename.

Corpus (1): ILEmitterTests_Inheritance__Plain_Func_Shadowing_Virtual_Parent_Is_ES2120

ES2121 error

A : func marker has no body in a concrete (non-abstract) subclass.

Fix. Supply a body, mark the class abstract, or remove the :.

Corpus (1): ILEmitterTests_Inheritance__Colon_Func_Without_Body_In_Concrete_Subclass_Is_ES2121

ES2122 error

A : func marker matches no virtual/abstract member on the inheritance chain.

Fix. Check the name against the base, or remove the :.

Corpus (1): ILEmitterTests_Inheritance__Colon_Func_With_No_Matching_Parent_Is_ES2122

ES2123 error

A : func marker targets a parent member that is neither virtual nor abstract.

Fix. Make the parent member virtual, or rename.

No corpus negative example yet.

ES2124 error

A : prefix is used in a class that declares no base type or interface.

Fix. Add a base/interface to the header, or remove the :.

Corpus (1): ILEmitterTests_Inheritance__Colon_Marker_Without_Inheritance_Header_Is_ES2124

ES2125 error

An abstract func is declared outside an abstract class.

Fix. Mark the class abstract, or give the method a body.

Corpus (1): ILEmitterTests_Inheritance__Abstract_Func_Outside_Abstract_Class_Reports_ES2125

ES2126 error

A virtual func is declared on a sealed class (sealed is the default).

Fix. Declare the class open or abstract.

Corpus (1): ILEmitterTests_Inheritance__Virtual_Func_On_Sealed_Class_Reports_ES2126

ES2127 error

An enum C: T { ... } names an underlying type that is not a CLR integral primitive.

Fix. Back the enum with byte, sbyte, short, ushort, int, uint, long, or ulong.

No corpus negative example yet.

ES2128 error

A : base(...) call’s argument count does not match the base init signature.

Fix. Match the base init parameter count.

Corpus (2): CtorOverloadTests__CtorBase_ArityMismatch_ES2128 · ILEmitterTests_Inheritance__Init_Mismatched_BaseArgs_Is_ES2128

ES2129 error

A visibility prefix precedes the : inheritance marker.

Fix. Write : pub func, not pub : func — participation in the base chain reads before access level.

No corpus negative example yet.

ES2130 error

A var is captured by a function literal across a task func boundary.

Fix. Move shared state into a chan<T> parameter, or capture a let.

Corpus (3): ILEmitterTests_TaskFunc__TaskFunc_Var_Capture_In_Function_Literal_Reports_ES2130 · ILEmitterTests_TaskFunc__TaskFunc_Let_Capture_In_Function_Literal_Is_OK · ILEmitterTests_TaskFunc__RegularFunc_Var_Capture_Is_Not_ES2130

ES2131 error

yield appears outside a function whose return type is IAsyncEnumerable<T>.

Fix. Change the return type to an async stream, or remove the yield.

No corpus negative example yet.

ES2132 error

A method receiver names a closed generic instantiation, such as func (h: Holder<int>) get().

Fix. Attach to the open form and make the method generic: func (h: Holder<T>) get().

No corpus negative example yet.

ES2133 error

An override returns a different type from the member it overrides.

Fix. An override fills the parent’s slot, so it shall have the parent’s return type. Change the return type, or drop the : and rename.

No corpus negative example yet.

ES2140 error

Two triggers: (a) an event is declared on a non-class (events imply identity); (b) a non-void function does not return on every path.

Fix. (a) Declare the type as a class. (b) Return on every path — the check is exhaustive-match-aware.

Corpus (1): ILEmitterTests_Coverage_Adversarial__DefiniteReturn_FallThrough_IsError

ES2141 error

An event is typed by something that is not a delegate.

Fix. Type it with a delegate — Action, EventHandler<T>, or a delegate func.

No corpus negative example yet.

ES2142 error

Two triggers: (a) a value-receiver method is called as a free function (bump(v) instead of v.bump()); (b) raise names an event not declared on the enclosing class.

Fix. (a) Call it as a method. (b) Declare the event on the enclosing class.

Corpus (2): ILEmitterTests_Coverage_Adversarial__Ns_ValueReceiverFreeCall_IsError · ILEmitterTests_Coverage_Adversarial__Ns_PointerReceiverFreeCall_IsError

ES2143 warning

The deprecated &T { ... } heap-allocation spelling.

Fix. Use new T { ... } — it lowers identically.

Corpus (1): ILEmitterTests_New__New_EmitsNoDeprecationWarning

ES2144 error

new is applied to a non-struct type; it heap-allocates a value struct into a *T.

Fix. Only new a value struct.

Corpus (3): ILEmitterTests_New__Neg_NewExternalGeneric_IsES2144 · ILEmitterTests_New__Neg_NewExternalType_IsES2144 · ILEmitterTests_New__New_PositionalGenericExternal_IsError_List

ES2145 error

Indexing ([...]) a non-indexable type (a struct, union, or enum).

Fix. Index a List, array, string, or other indexable type.

Corpus (5): IndexDiagnosticTests__IndexingData_Errors · IndexDiagnosticTests__IndexingChoice_Errors · IndexDiagnosticTests__IndexingEnum_Errors · IndexDiagnosticTests__IndexingList_DoesNotError · IndexDiagnosticTests__IndexingString_DoesNotError

ES2146 error

An undefined name — no local, parameter, function, type, or namespace by that name is in scope.

Fix. Check the spelling, add the using, or declare it.

Corpus (2): TotalBinderTests__UndefinedName_IsLocatedBinderError · TotalBinderTests__UndefinedName_DoesNotCascade

ES2147 error

A member access names something the receiver type does not have.

Fix. Check the spelling. The message names the type, so compare against its fields, embedded members, and methods.

Corpus (1): TotalBinderTests__UnknownMemberOnData_IsLocatedBinderError

ES2148 error

A composite literal names a type the binder does not know.

Fix. Declare the type, import or qualify it, or use constructor-call syntax for an external CLR type.

Corpus (1): TotalBinderTests__UnknownCompositeLiteralType_IsLocatedBinderError

ES2150 error

A bare type name lives in another namespace.

Fix. Add using "NS" or qualify as NS.Type.

Corpus (1): ILEmitterTests_Coverage_Adversarial__Ns_BareCrossNamespace_WithoutUsing_IsError

ES2151 error

A bare type name is ambiguous — visible from two in-scope/imported namespaces at once.

Fix. Qualify (A.Widget) or alias one (using W = "A.Widget").

Corpus (2): ILEmitterTests_ExternalReflection__AmbiguousExternalType_AcrossImports_ReportsES2151 · ILEmitterTests_ExternalReflection__QualifiedExternalType_SilencesAmbiguity

ES2152 error

A bare free-function name lives in another namespace.

Fix. Add using "NS" or qualify as NS.fn.

Corpus (1): ILEmitterTests_StdlibReadiness__G22_SameArityRedeclaration_StillErrors

ES2153 warning

A type structurally matches an interface it does not declare — conformance is nominal.

Fix. Add : IFoo to declare the conformance explicitly.

Corpus (2): ILEmitterTests_Nominal__Undeclared_StructuralMatch_RejectedAndSuggested · ILEmitterTests_Nominal__Added_UndeclaredStructuralMatch_WarnsES2153

ES2154 error

A type name does not resolve — no type by that name is in scope.

Fix. Add the using for its namespace, or qualify the name.

No corpus negative example yet.

ES2155 warning

A name resolved through the compiler process by reflection fallback rather than through the reference set.

Fix. Reference the declaring assembly explicitly, so the answer does not depend on what the compiler process happens to have loaded.

No corpus negative example yet.

ES2156 error

A call names a member the static facet does not declare — no function, field, or nested type by that name.

Fix. Check the member name against the facet declaration, or add the member.

No corpus negative example yet.

ES2160 error

A type name is not PascalCase.

Fix. Start the type name with an uppercase letter.

Corpus (3): TotalBinderTests__RegistrationError_StillBinds · ILEmitterTests_Coverage_Adversarial__Ns_LowerCaseTypeName_IsError · ILEmitterTests_Coverage_Adversarial__Ns_SnakeCaseTypeName_IsError

ES2161 error

A free-function name is not camelCase.

Fix. Start the free-function name with a lower-case letter (methods and static members may be PascalCase).

No corpus negative example yet.

ES2170 error

A match is not exhaustive. The message lists the missing cases.

Fix. Add the missing arms, or add a default.

No corpus negative example yet.

ES2171 warning

A default arm is unreachable because the cases already cover the subject.

Fix. Remove the default.

No corpus negative example yet.

ES2172 error

A union or enum is matched by a type pattern. Both are closed types.

Fix. Match with .case patterns. Type patterns are for open hierarchies — an abstract class, an interface, or object.

Corpus (1): MatchTypePatternTests__TypePattern_OverChoice_IsRejected

ES2173 error

A smart-cast narrow cannot be proven stable at this point.

Fix. Smart-cast applies to let locals, parameters, and let-field paths with no intervening call. Use as (yields T?) or as!.

Corpus (2): NarrowingTests__Var_Narrow_IsRejected_WithRebindHint · NarrowingTests__FieldPath_Narrow_RejectedAcrossCall

ES2174 error

A nil arm matches a non-nullable subject, so it can never match.

Fix. Remove the arm, or make the subject T?.

No corpus negative example yet.

ES2180 error

A default argument does not fold to a constant shape.

Fix. Use a literal, nil, or a composite-literal / dot-case / ok-error construction over constants.

Corpus (4): DefaultNamedArgsTests__NonConstant_Default_IsES2180 · DefaultNamedArgsTests__Default_ReferencingPriorParam_IsES2180 · DefaultNamedArgsTests__Default_CallExpression_IsES2180 · DefaultNamedArgsTests__OutParam_Default_IsES2180

ES2181 error

A positional argument follows a named argument.

Fix. Move the positional argument ahead of the named ones, or give it a name.

Corpus (1): DefaultNamedArgsTests__Positional_AfterNamed_IsES2181

ES2182 error

A named argument names no parameter of the callee.

Fix. Check the spelling, or drop the name and pass it positionally.

Corpus (1): DefaultNamedArgsTests__UnknownName_IsES2182

ES2183 error

The argument count does not match any arity the callee accepts.

Fix. Supply every required argument. Overloads are selected by arity, so the count decides the candidate.

Corpus (1): DefaultNamedArgsTests__UnfilledParam_IsES2183

ES2184 error

One parameter is supplied more than once — positionally and by name, or named twice.

Fix. Remove the duplicate argument.

Corpus (1): DefaultNamedArgsTests__DuplicateArg_IsES2184

ES2185 error

A type declares two init members with the same parameter count.

Fix. Overloads resolve by arity. Give one a different arity, or merge them with a default parameter.

Corpus (2): PrimaryCtorCaptureTests__Header_SecondaryDuplicatesHeaderArity_ES2185 · CtorOverloadTests__CtorOverload_DuplicateArity_ES2185

ES2186 error

A secondary init on a class with a capture header does not delegate to the primary.

Fix. Add : this(...) so the primary runs.

Corpus (1): PrimaryCtorCaptureTests__Header_SecondaryInitWithoutThis_ES2186

ES2187 error

An init delegation chain forms a cycle, including an init that delegates to itself.

Fix. Break the cycle so one init is the root.

Corpus (2): CtorOverloadTests__CtorDelegation_SelfCycle_ES2187 · CtorOverloadTests__CtorDelegation_MutualCycle_ES2187

ES2188 error

A capture-header parameter has the same name as a declared field.

Fix. Rename the parameter or the field.

Corpus (1): PrimaryCtorCaptureTests__Header_FieldNameConflict_ES2188

ES2189 error

A composite literal omits a required field.

Fix. Supply every required field, or drop the requirement from the declaration.

Corpus (2): RequiredDeconstructTests__Required_Omitted_ES2189 · RequiredDeconstructTests__Required_OnClass_CompositeLiteralChecked

ES2190 error

A composite literal constructs a class that has a capture header.

Fix. Call the primary constructor positionally: Foo(...).

Corpus (1): PrimaryCtorCaptureTests__Header_CompositeLiteral_ES2190

ES2191 error

? is applied to something that is not a Result<T, E>.

Fix. Await first ((await x)?), or use ?? / ?. for optional access.

No corpus negative example yet.

ES2192 error

A type inherits from a sealed type.

Fix. Declare the base open or abstract, or compose instead of inheriting.

No corpus negative example yet.

ES2193 error

A stored let x { } property is declared on a value struct, which has no init to write through it.

Fix. Use a computed property (let x => expr), required let x { } set by composite literal, or declare the type as a class.

No corpus negative example yet.

ES2194 error

A type argument cannot be inferred. Inference does not flow from the expected type.

Fix. Supply the type arguments explicitly.

No corpus negative example yet.

ES2195 error

An init carries pub. A constructor is public by default.

Fix. Remove pub. The only prefixes on an init are the narrowing ones, priv and protected.

No corpus negative example yet.

ES2196 error

An unexpected token appears in a property accessor block.

Fix. The message lists every accepted accessor form.

No corpus negative example yet.

ES2197 error

An if used as a value has no else.

Fix. Add the else. Every path shall yield a value.

No corpus negative example yet.

ES2198 error

The branches of an if-expression yield different types.

Fix. Give the binding an explicit type to reconcile them.

No corpus negative example yet.

ES2199 error

An if-expression branch does not end in a value expression.

Fix. End the branch with a value, or diverge with return or throw.

No corpus negative example yet.

ES2201 error

A loca or mut capability does not directly name stable storage.

Fix. Write &self.name.

No corpus negative example yet.

ES2202 error

A property declares more than one mut accessor.

Fix. Keep one.

No corpus negative example yet.

ES2205 error

A namespace init carries a visibility modifier or attribute.

Fix. Write the declaration as bare init { ... }.

No corpus negative example yet.

ES2206 error

More than one init block is declared for the same namespace across the compilation.

Fix. Combine the setup into one block; cross-file initializer ordering is intentionally not inferred.

No corpus negative example yet.

ES2207 error

return appears in a namespace init block.

Fix. Remove the return; namespace initialization completes by reaching the end of the block.

No corpus negative example yet.

ES2208 error

Suspending work (await, await for, or async let) appears directly in a namespace init.

Fix. Keep host initialization synchronous; start asynchronous work from an ordinary function.

No corpus negative example yet.

ES2209 error

A namespace declares the same field or property state name more than once.

Fix. Keep one declaration or rename one host member.

No corpus negative example yet.

ES2210 error

The removed static func Foo spelling was used.

Fix. Write static Foo { ... }.

No corpus negative example yet.

ES2211 error

A static Foo receiver names no declared static facet.

Fix. Declare static Foo { ... }, or attach the method as an instance method without the static keyword.

No corpus negative example yet.

ES2212 error

A static receiver was marked readonly or pointer-shaped.

Fix. A static facet has no value receiver; write func (x: static Foo).

No corpus negative example yet.

ES2213 error

yield &location appears outside a property mut accessor.

Fix. Move the lend point directly inside mut { ... }.

No corpus negative example yet.

ES2214 error

A scoped mut accessor is declared on namespace state.

Fix. Use an instance property, or use a durable loca/mut location for namespace state.

No corpus negative example yet.

ES2215 error

A scoped mut property location attempts to escape its lend/resume region.

Fix. Pass it directly to one borrowing call, or provide a durable loca contract.

No corpus negative example yet.

ES2216 error

One call attempts to borrow more than one scoped mut property.

Fix. Split the operation into calls with one scoped lend each.

No corpus negative example yet.

ES2217 error

A scoped property borrow reached lowering without its property capability.

Fix. Internal compiler error; report the reproducing source.

No corpus negative example yet.

ES2218 error

A void scoped-borrowing call is used somewhere other than a statement.

Fix. Use the borrowing call as a statement.

No corpus negative example yet.

ES2219 error

A scoped mut lend crosses await.

Fix. Complete the scoped borrow synchronously, or use a durable property location.

No corpus negative example yet.

ES2220 error

return appears inside scoped mut.

Fix. Commit, validate, or throw from the resume portion after yield.

No corpus negative example yet.

ES2221 error

Scoped mut captures or spawns work from its lend region.

Fix. Move the work outside the accessor or use durable loca/mut.

No corpus negative example yet.

ES2222 error

Addressing a custom-set property would bypass its setter policy.

Fix. Declare explicit loca or mut to acknowledge the location behavior.

No corpus negative example yet.

ES2223 error

A scoped mut accessor does not contain exactly one lend point.

Fix. Provide exactly one yield &working.

No corpus negative example yet.

ES2224 error

Scoped mut lends something other than an addressable local.

Fix. Create an addressable local and lend it as yield &working.

No corpus negative example yet.

ES2225 error

The scoped mut working location has the wrong value type.

Fix. Make the yielded local type match the property type.

No corpus negative example yet.

ES2226 error

A field is used to implement an interface property.

Fix. Declare the implementing member with let or var so it owns a property ABI.

No corpus negative example yet.

ES2227 error

var name: T => expression supplies a getter but no writable behavior.

Fix. Use let, or use an accessor block with a custom getter and setter.

No corpus negative example yet.

ES2228 error

A var custom getter has no authored write behavior.

Fix. Add set(value) => effect or mut, or change the property to let.

No corpus negative example yet.

ES2229 error

A property accessor declares a visibility wider than the property’s own.

Fix. A per-accessor pub/priv may only narrow the property; widen the property itself instead.

No corpus negative example yet.

ES2230 error

A by-ref-like value is stored in a field. E# types are heap-capable, and a by-ref-like value may not reach the heap.

Fix. Keep the value in a local or a parameter.

No corpus negative example yet.

ES2231 error

A function returns a by-ref-like type.

Fix. Not yet available: it needs return-lifetime analysis. Return an owned value, or pass a destination in.

No corpus negative example yet.

ES2232 error

A by-ref-like value is live across an await.

Fix. Finish the work with it before suspending, or copy out the part that must survive.

No corpus negative example yet.

ES2233 error

A by-ref-like value is captured by a function literal.

Fix. Pass it as a parameter to the literal instead of capturing it.

No corpus negative example yet.

ES2234 error

A by-ref-like value is boxed.

Fix. Boxing puts the value on the heap, which its type forbids. Convert to an owned type first.

No corpus negative example yet.

ES2235 error

A native numeric conversion is not valid between these two types.

Fix. Check the source and target — the message names the pair.

No corpus negative example yet.

ES2236 error

A numeric literal does not fit the target type.

Fix. Widen the target type, or write a value inside the range.

No corpus negative example yet.

ES2237 error

A compiler directive is malformed.

Fix. Check the directive spelling and its arguments.

No corpus negative example yet.

ES2238 error

A @floatMode directive is duplicated or conflicts with another.

Fix. Keep one directive for the scope.

No corpus negative example yet.

ES2239 error

A composite literal targets a type that declares a constructor, so it has no parameterless one to initialize through.

Fix. Call the constructor. The message names its parameters.

No corpus negative example yet.

ES2240 warning

An un-awaited call to an async function blocks here until the result is ready (sync over async).

Fix. await it, or bind it with let/var to defer the join to first use.

No corpus negative example yet.

ES2241 error

@derive is written without its parenthesized list.

Fix. Write @derive(record) or @derive(equality, debug).

No corpus negative example yet.

ES2242 error

@derive names a derive that is not registered.

Fix. The message lists the available derives. Reference the pack that provides it, or fix the spelling.

No corpus negative example yet.

ES2243 error

A derive is given arguments it does not take.

Fix. Write the derive with no argument list.

No corpus negative example yet.

ES2244 error

A derive already generates what another derive in the same list generates.

Fix. Remove the redundant one; the message names it.

No corpus negative example yet.

ES2245 error

A with expression targets a value that cannot be copied.

Fix. Use a struct, or a class carrying @derive(record), whose <Clone>$ provides the copy.

No corpus negative example yet.

ES2246 error

A derive argument is not a constant.

Fix. Fold the argument to a literal. A provider receives the folded value.

No corpus negative example yet.

ES2260 error

An explicit awaitable is used where the operator needs a value.

Fix. await it, or join it explicitly, before using it here.

No corpus negative example yet.

ES2270 error

An operator function is outside an operand type’s companion static facet, or is declared as an instance operator.

Fix. Put it in static T { ... }, or attach it with func (x: static T) ... after declaring that facet.

No corpus negative example yet.

ES2271 error

An operator function declares method type parameters or uses task/await/yield.

Fix. Keep the operator synchronous and use only the owning generic type’s parameters.

No corpus negative example yet.

ES2272 error

An operator function has no explicit result or returns void.

Fix. Declare a non-void -> T result.

No corpus negative example yet.

ES2273 error

An operator function has the wrong number of explicit operands.

Fix. Use one operand for unary operators and two for binary operators.

No corpus negative example yet.

ES2274 error

An operator operand is optional, out, pointer-shaped, or by-reference.

Fix. Use required, by-value operands.

No corpus negative example yet.

ES2275 error

No explicit operand has the companion owner’s open type identity.

Fix. Make at least one operand the owning class/struct type; the synthetic static receiver does not count.

No corpus negative example yet.

ES2276 error

A declared shift operator does not take int as its right operand.

Fix. Change the shift-count parameter to int.

No corpus negative example yet.

ES2277 error

An equality or ordering operator does not return bool.

Fix. Return bool.

No corpus negative example yet.

ES2278 error

The same owner declares a duplicate operator signature.

Fix. Keep one operator for that kind and exact ordered parameter types.

No corpus negative example yet.

ES2279 error

A required comparison partner is missing or has different ordered parameter types.

Fix. Declare matching ==/!=, </>, or <=/>= pairs.

No corpus negative example yet.

ES2280 error

derive equality conflicts with an explicit ==/!= pair.

Fix. Remove the derive or remove the explicit equality pair.

No corpus negative example yet.

ES2281 error

More than one exact source or imported CLR operator is applicable.

Fix. Use an explicit native conversion such as T(value) to select one exact signature.

No corpus negative example yet.

ES2282 error

A derived compound operator result is not exactly assignable to its target.

Fix. Make the binary operator return the target type exactly, or use an explicit assignment/conversion.

No corpus negative example yet.

ES2283 error

A primitive bitwise, complement, or shift expression has invalid operand types and no exact overload.

Fix. Use matching integral operands (or bool for bitwise operators) and an int shift count.

No corpus negative example yet.

ES2284 error

A local is declared twice in one scope.

Fix. Rename the binding, or assign to the existing one instead of redeclaring it.

No corpus negative example yet.

ES2285 error

A tuple element name does not exist on the tuple.

Fix. Use one of the declared labels, or a positional .Item1.ItemN.

No corpus negative example yet.

ES2286 error

An [assembly: ...] attribute is written inside a declaration or a body, where the target cannot mean anything.

Fix. Move it to the top level of a file. An assembly attribute belongs to the output, not to the declaration that follows it.

No corpus negative example yet.

ES2287 error

An [assembly: ...] attribute names no attribute type, or no constructor matching the arguments given.

Fix. Check the attribute name, its using, and the argument list against the constructor.

No corpus negative example yet.

ES2288 error

A bare lambda is passed where a System.Delegate or MulticastDelegate parameter is expected. The abstract base names no Invoke, so there is no signature to infer parameter types from.

Fix. Annotate the parameters, or pass a concrete delegate type such as Action or Func<...>.

No corpus negative example yet.

ES2289 error

A receiver block is in the wrong position. Two triggers: (a) ext at namespace scope; (b) a receiver block inside a static facet that is not marked ext.

Fix. (a) Move it into a static facet, or drop ext to attach it to a type this namespace owns. (b) Write func (ext r: T), or move it to namespace scope.

No corpus negative example yet.

ES2290 error

An ext receiver names a static facet. An extension extends a value, and a static facet has none.

Fix. Give the extension a value receiver, or declare an ordinary function in the facet.

No corpus negative example yet.

ES2291 error

An extension host merges into a same-named type declared beside it, so the emitted host is not a CLR static class and no other language can see the extension.

Fix. Host it in a facet whose name is not also a type, such as static FooExtensions.

No corpus negative example yet.

ES2292 error

A flag-set operation is written over something that is not a flag set, or over two different flag-set enums. @derive(flags) is also written on a declaration that is not an enum.

Fix. Use one flag-set enum for both operands. Add @derive(flags) to the enum when its cases are single bits.

No corpus negative example yet.

ES2293 error

A nonliteral numeric argument reaches a parameter of a different numeric type. E# has no implicit widening.

Fix. Write the conversion: long(value). A literal needs no conversion — it takes the target type.

No corpus negative example yet.

ES2294 error

A function literal produces one awaitable wrapper where the target delegate returns another. The wrappers are distinct types and do not convert.

Fix. Convert the value (.AsTask()), declare the slot over the produced wrapper, or await in the body so the literal builds the target shape.

No corpus negative example yet.

ES2295 error

A private nested type is named from outside the type that declares it.

Fix. Declare the nested type pub, or reference it only from its declarer.

No corpus negative example yet.

ES2296 error

A member is reached through an optional receiver. An optional does not become the proven type on its own.

Fix. Prove it is present first: ?.member, ??, a nil check, a let-guard, or match.

No corpus negative example yet.

ES2297 error

A match arm names a case the subject type does not have, so the arm can never be taken.

Fix. Check the case spelling against the union or enum the subject declares.

No corpus negative example yet.

ES2298 error

An ext block holds a member kind it cannot carry. An extension has no per-receiver storage, so stored state, var, const, operators, and members that write their own receiver are refused.

Fix. Write a func member, or a computed get-only property let name: Type => e.

No corpus negative example yet.

ES2299 error

An ext block is written in a type body. An extension is detached by definition, so a type body cannot host one.

Fix. Move the block into a standalone static class, or to namespace scope.

No corpus negative example yet.

ES2301 error

A variable is read before it is definitely assigned on every path reaching the read.

Fix. Assign it on every path, or give it an initializer.

No corpus negative example yet.

ES2302 error

An out parameter is not definitely assigned on all return paths.

Fix. Assign it before every return.

No corpus negative example yet.

ES2900 error

A derive refused the type it was applied to. The provider states the reason.

Fix. Read the rejection; it names what the provider needed and did not find.

No corpus negative example yet.

ES2901 error

A synthesized member carries no source span, so it could never be evicted when its file changes.

Fix. Provider bug — give the member the receiver’s span. Report it with the provider name.

No corpus negative example yet.

ES2902 error

A synthesized member carries no member facts, so its accessibility and vtable role are undecided.

Fix. Provider bug — construct the member with facts. Report it with the provider name.

No corpus negative example yet.

ES2903 error

A provider produced an instance member where the shape does not permit one.

Fix. Provider bug. Report it with the provider name.

No corpus negative example yet.

ES2904 error

A synthesized member’s declared arity does not match its parameter list.

Fix. Provider bug. Report it with the provider name.

No corpus negative example yet.

ES2905 error

A synthesized member has an untyped parameter, or no return type.

Fix. Provider bug — every synthesized signature shall be fully typed. Report it with the provider name.

No corpus negative example yet.

ES2906 error

A synthesized member is an explicit override of something that cannot be overridden.

Fix. Provider bug. Report it with the provider name.

No corpus negative example yet.

ES2907 error

A provider produced a virtual member on a struct, which has no vtable.

Fix. Provider bug. Report it with the provider name.

No corpus negative example yet.

ES2908 error

A provider produced a protected member on a struct, which cannot be inherited from.

Fix. Provider bug. Report it with the provider name.

No corpus negative example yet.

ES2909 error

A provider marked a non-constructor RTSpecialName.

Fix. Provider bug. Report it with the provider name.

No corpus negative example yet.

ES2910 error

Two derives generate the same member.

Fix. Remove one derive, or declare the member by hand — a hand-written member wins silently over a generated one.

No corpus negative example yet.

ES2911 error

The derives on a type have a circular dependency and cannot be ordered.

Fix. Break the cycle in the providers’ DependsOn lists.

No corpus negative example yet.

ES2920 error

A provider pack named in the project does not exist.

Fix. Fix the path in the .esproj, or restore the pack.

No corpus negative example yet.

ES2921 error

A provider pack could not be loaded.

Fix. The message carries the loader error. Check the target framework and the dependencies of the pack.

No corpus negative example yet.

ES2922 error

A provider has no parameterless constructor, or threw while being constructed.

Fix. Give the provider a parameterless constructor and keep its construction free of work that can fail.

No corpus negative example yet.

ES2923 error

Two packs declare a provider of one name.

Fix. Remove one pack, or rename the provider. The first is the incumbent.

No corpus negative example yet.

ES2924 error

A type in a provider pack could not be loaded.

Fix. The message carries the reason — usually a missing dependency of the pack.

No corpus negative example yet.

ES2930 error

An analyzer threw while inspecting, or while reporting its phases.

Fix. The analyzer is degraded and the compilation continues. Report the throw with the analyzer name.

No corpus negative example yet.

ES2931 error

An emitted unit has no name, or one analyzer emitted two units of one name.

Fix. Give every emitted unit a distinct name.

No corpus negative example yet.

ES2932 error

An analyzer emitted source at the body phase. Emission is a declaration-phase capability.

Fix. Emit at the declaration phase, where the program’s declared surface is still open.

No corpus negative example yet.

ES2933 error

An emitted unit’s path is absolute, or escapes the project directory.

Fix. Emit to a relative path inside the project.

No corpus negative example yet.

ES2934 error

A finding has no id, or claims an id of ES followed by digits.

Fix. ES+digits is the compiler’s own space. Choose an id a reader cannot confuse with a compiler diagnostic.

No corpus negative example yet.

ES2935 error

An analyzer reported a finding against a file it was not inspecting.

Fix. Report only against the file the analyzer received.

No corpus negative example yet.

ES2936 error

Two units were emitted to one path, or the path is already a unit in this compilation.

Fix. Give each emitted unit its own path.

No corpus negative example yet.

ES2938 error

Generated declarations did not settle: a provider is not deterministic across rounds.

Fix. Make the provider produce the same declarations for the same input.

No corpus negative example yet.

ES2940 error

A delimited region has no matching }.

Fix. Close the region.

No corpus negative example yet.

ES2941 error

No loaded template owns this region sigil.

Fix. Reference the pack that provides the template, or check the sigil spelling.

No corpus negative example yet.

ES2942 error

A region sigil is not followed by a body.

Fix. Give the region a body.

No corpus negative example yet.

ES2943 error

A template produced a fragment of the wrong shape for the position it is written in.

Fix. The message names the shape the position takes. Fix the template, or move the region.

No corpus negative example yet.

ES2944 error

A region in value position produced other than exactly one expression.

Fix. A value position takes one expression.

No corpus negative example yet.

ES2945 error

A template threw while parsing a region, or while reporting its positions.

Fix. Report the throw with the sigil.

No corpus negative example yet.

ES2946 error

A region is written in a position its template does not accept.

Fix. The message names the position. Move the region, or widen the template’s accepted positions.

No corpus negative example yet.

ES2947 error

A template rejected the contents of its region.

Fix. Read the rejection; it comes from the template, not the compiler.

No corpus negative example yet.

ES2948 error

A derive is written at a site its provider does not accept.

Fix. The message names the site. Move the derive to a site the provider accepts.

No corpus negative example yet.

ES2949 error

A top-level type has the same name as its namespace; that name is reserved for the namespace host class that holds free functions, consts, and state.

Fix. Rename the type. namespace A.B reserves the type name B.

No corpus negative example yet.

ES3004 warning

An async let initializer is a user function with no await; it is auto-wrapped in Task.Run for fan-out.

Fix. Add await inside the callee to make it naturally async, or accept the thread-pool hop.

Corpus (1): AsyncIntegrationTests__AsyncLet_SyncUserFunc_IL_WrapsInTaskRun

ES3005 error

An async let initializer is not a function call or awaitable expression.

Fix. Wrap a non-call expression in Task.Run(() => ...).

No corpus negative example yet.

ES3012 error

An init block is declared on a value-semantic struct, which has no constructors.

Fix. Construct with a composite literal T { ... } or a factory func; or declare the type as a class.

Corpus (4): CtorOverloadTests__Data_InitBlock_StillES3012 · DataContractTests__InitBlock_OnData_Errors · DataContractTests__InitBlock_OnRefData_Ok · DataContractTests__PositionalForm_OnData_StillWorks

ES3013 error

At emit, a call names more than one emitted method with that name and argument count, and carries no resolved symbol to choose between them.

Fix. Internal — report the reproducing source.

No corpus negative example yet.

ES4001 warning

A binding shadows an enclosing binding of the same name; the outer one returns when this scope ends.

Fix. Rename one of them if both are meant to be readable here.

No corpus negative example yet.

ES4002 warning

A tuple element label is ignored because the target type already names that element.

Fix. Use the target’s name, or drop the label.

No corpus negative example yet.

ES8001 warning

Passing a large value parameter copies the whole value.

Fix. Take readonly *T and pass &value when aliasing is intended.

No corpus negative example yet.

ES8002 warning

A value receiver snapshots a large struct on every call.

Fix. Use a readonly receiver, or readonly *T when aliasing is intended.

No corpus negative example yet.

ES8003 warning

Returning a large value copies it.

Fix. Keep the value return when snapshot semantics are required; otherwise return a pointer.

No corpus negative example yet.

ES8004 warning

Boxing a value allocates an object.

Fix. Avoid the conversion to object or to a non-generic interface on a hot path.

No corpus negative example yet.

ES8005 warning

A capturing function literal allocates a display class.

Fix. Pass the captured state as parameters if the allocation matters here.

No corpus negative example yet.

ES8006 warning

Enumeration goes through the generic IEnumerable path and may allocate an enumerator.

Fix. Enumerate an array or a span, which lower to direct indexing.

No corpus negative example yet.

ES8007 warning

A pointer promotion allocates.

Fix. The message names the promoted value; keep it frame-local if the allocation matters.

No corpus negative example yet.

ES9001 error

Assembly fusion (ILRepack) of the E# and C# halves failed.

Fix. Internal — report with the message.

No corpus negative example yet.

ES9002 error

The E# IL emission phase threw an unhandled exception.

Fix. Internal — report with the message.

No corpus negative example yet.

ES9003 error

The C# half (Roslyn) emission threw an unhandled exception.

Fix. Internal — report with the message.

No corpus negative example yet.

ES9010 error

A source file listed in the project is not on disk.

Fix. Fix the path in the .esproj, or restore the file.

No corpus negative example yet.

ES9500 error

An internal compiler error. A phase threw and the failure was located rather than surfaced as an opaque crash.

Fix. The input may still be valid E#. Report it with the phase name in the message.

No corpus negative example yet.

ES9501 error

An entity that is known to exist failed to resolve — a scope or context error hid it at this site.

Fix. Internal compiler error. Report the reproducing source.

No corpus negative example yet.

ES9510 error

An emitted type declares an interface but provides no loadable implementation of one of its members. The runtime would reject it with TypeLoadException.

Fix. Compiler bug — report the reproducing source. For a value type the implementing method must be virtual and final.

No corpus negative example yet.

ES9511 error

An emitted generic instantiation uses a type argument that does not satisfy a constraint. The runtime would reject it with VerificationException.

Fix. Compiler bug — report the reproducing source.

No corpus negative example yet.

ES9512 error

An emitted method is neither abstract nor extern yet carries no IL body.

Fix. Compiler bug — report the reproducing source.

No corpus negative example yet.

ES9513 error

An emitted instantiable type declares an abstract member.

Fix. Compiler bug — report the reproducing source.

No corpus negative example yet.

ES9514 error

An emitted override targets a slot on no interface the type implements and no base type, so the runtime cannot bind it at load.

Fix. Compiler bug — report the reproducing source.

No corpus negative example yet.

ES9515 error

An emitted value type contains itself by value — an infinitely-sized layout.

Fix. Break the cycle with a pointer. See ES2002, the source-level form of this rule.

No corpus negative example yet.

ES9516 error

An emitted type declares one member twice with the same signature.

Fix. Compiler bug — report the reproducing source.

No corpus negative example yet.

ES9517 warning

A type could not be resolved during emit and was erased to System.Object. The assembly loads, but the erasure is usually a latent mis-compile.

Fix. Reference the declaring assembly, or check the name.

No corpus negative example yet.