code: public boolean isCompatibleWith(DataType other) {
          // A type is compatible with a choice type if it is a subtype of one of the choice types
          if (other instanceof ChoiceType) {
              for (DataType choice : ((ChoiceType)other).getTypes()) {
                  if (this.isSubTypeOf(choice)) {
                      return true;
                  }
              }
          }
  
          return this.equals(other); // Any data type is compatible with itself
      }
docs: literal to any other type, or casting a class to an equivalent tuple.