Skip to content

[std.bitmanip] BitArray const missed in param of methods #10992

@John-ik

Description

@John-ik

Example:

BitArray a = [1, 0, 1];
const BitArray b = [0, 1, 1];
a ~= b; // compile error

a |= b; // But its works

Arg b hasnt const in method opOpAssign(string op)(BitArray b) if (op == "~").
All methods and properties that called from body is const.

Please, check also opBinary and opCmp that const method but param isnt const:

const BitArray a = [1, 0];
const BitArray bc = [0, 1];

BitArray c = a ~ bc; // compile error

BitArray bm = [0, 1];
BitArray cc = a ~ bm; // compiles

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions