dartdart-editor

Dart Editor bitwise XOR showing as unknown


The current version of Dart Editor is showing the bitwise XOR operator as not defined for class bool

I don't see it defined in num.dart either.

Ex:

bool x = a ^ b;

The editor shows the "Caret" as not defined.

Update: Dart's api spec only allows bitwise XOR on integers. I fixed my code to properly work with bools.


Solution

  • (Copied from the question, so that this appears as answered...)

    Dart's spec only allows bitwise XOR on integers.