Open sandboxFocusImprove this doc

Durability and immutability errors and warnings

Diagnostics reported by the analyzers that verify the [Durable] and [ImmutableType] contracts of compile-time code.

Article Description
LAMA0870: A member of a durable type is not durable A field or property of a [Durable] type has a type that isn't durable.
LAMA0871: A durable member is assigned a value that is not durable A value that isn't durable is stored in a member marked [Durable].
LAMA0872: A durable parameter receives an argument that is not durable An argument that isn't durable is passed to a parameter marked [Durable].
LAMA0873: A durable type derives from a type that is not durable A [Durable] type derives from a base class that isn't durable.
LAMA0874: The [Durable] attribute is redundant because the contract is inherited A [Durable] attribute is applied to a type that already inherits the contract.
LAMA0875: A weak reference held by a durable type should be named Dangerous A weak-reference member of a durable type isn't named with the 'Dangerous' suffix.
LAMA0876: An interface or abstract type used by a durable type is not marked [Durable] A member of a durable type has an interface or abstract type that isn't marked [Durable].
LAMA0877: A [Durable] member must not be writable from outside its type A [Durable] field or property can be assigned from outside the type that declares it.
LAMA0878: A lambda in a durable position captures a value that isn't durable A lambda used where a durable value is required captures a value that isn't durable.
LAMA0879: A declared durable type name matches no type A type name declared in MetalamaDurableType or MetalamaNonDurableType matches no type.
LAMA0880: A field of an immutable type must be read-only or private A field of an aspect, a fabric, or a validator is neither read-only nor private.
LAMA0881: An automatic property of an immutable type must not have a public setter An automatic property of an aspect, a fabric, or a validator has a setter that isn't private.
LAMA0882: A member of an immutable type has a mutable type A member of a type that must be immutable has a mutable type.
LAMA0883: An immutable type derives from a mutable base type A type that must be immutable derives from a mutable base type.
LAMA0884: A member of an immutable type is an interface that isn't marked immutable A member of a type that must be immutable is typed as an unmarked interface or abstract type.
LAMA0885: A type name declared as immutable matches no type A type name declared as immutable in the project file matches no type.
LAMA0886: The [ImmutableType] attribute is redundant An [ImmutableType] attribute is redundant because the type already inherits the contract.
LAMA0887: A member of an immutable type is assigned outside a constructor A member of a type that must be immutable is assigned outside a constructor.
LAMA0888: A member of an immutable type is passed as an out argument A member of a type that must be immutable is passed as an out argument outside a constructor.