StructDeclaration.fit

Fit elements[] to the corresponding types of the struct's fields.

class StructDeclaration
final
bool
fit
(
const ref Loc loc
,,
Expressions* elements
,)

Parameters

loc
Type: Loc

location to use for error messages

sc
Type: Scope*

context

elements

explicit arguments used to construct object

stype
Type: Type

the constructed object type.

Return Value

Type: bool

false if any errors occur, otherwise true and elements[] are rewritten for the output.

Meta