mutabilityOfType

Determine mutability of indirections in (ref) t.

int
mutabilityOfType
(
bool isref
,)

Parameters

isref bool

if true, check ref t; otherwise, check just t

t Type

the type that is being checked

Return Value

Type: int

When the type has any mutable indirections, returns 0. When all indirections are immutable, returns 2. Otherwise, when the type has const/inout indirections, returns 1.

Meta