```D
unittest
{
    auto n = immutable(BigInt)(23);
    BigInt m = cast(BigInt)(n);
    const(BigInt) l = cast(const(BigInt))(n);
}
```
works fine for me.