The "Is" type-testing operator behaving unexpectedly in DartPad

42 Views Asked by At

It was my understanding that is type testing operator in Dart should return "True if the object has a certain type."

So why is this happening in DartPad??

void main() {
  
  // as
  // is
  // is!
  
  double d = 3.0;
  bool result = d is int;
  print(result); // prints true!
  
}
0

There are 0 best solutions below