Summary: BigInt/boolean error message
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Keywords: diagnostic
          Severity: normal
          Priority: P2
         Component: Phobos

--- Comment #0 from 2012-10-17 13:39:56 PDT ---
import std.bigint: BigInt;
void main() {
    auto r1 = BigInt(10) / true;
    auto r2 = BigInt(10) /= true;

DMD 2.061alpha gives:

...\dmd2\src\phobos\std\bigint.d(135): Error: operation not allowed on bool 'y'
...\dmd2\src\phobos\std\bigint.d(258): Error: template instance
std.bigint.BigInt.opOpAssign!("/",bool) error instantiating
test.d(3):        instantiated from here: opBinary!("/",bool)
test.d(3): Error: template instance std.bigint.BigInt.opBinary!("/",bool) error

If this operation is not allowed, then maybe it's better to disallow it
statically (maybe with a template constraint), to give a nicer/more clean error

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to