code: private void checkEnumAlias(
        NodeTraversal t, JSDocInfo declInfo, JSType valueType, Node nodeToWarn) {
      if (declInfo == null || !declInfo.hasEnumParameterType()) {
        return;
      }
  
      if (!valueType.isEnumType()) {
        return;
      }
  
      EnumType valueEnumType = valueType.toMaybeEnumType();
      JSType valueEnumPrimitiveType =
          valueEnumType.getElementsType().getPrimitiveType();
      validator.expectCanAssignTo(
          nodeToWarn,
          valueEnumPrimitiveType,
          declInfo.getEnumParameterType().evaluate(t.getTypedScope(), typeRegistry),
          "incompatible enum element types");
    }
docs: Checks enum aliases.
  
  <p>We verify that the enum element type of the enum used for initialization is a subtype of the
  enum element type of the enum the value is being copied in.
  
  <p>Example:
  
  <pre>var myEnum = myOtherEnum;</pre>
  
  <p>Enum aliases are irregular, so we need special code for this :(
  
  @param valueType the type of the value used for initialization of the enum
  @param nodeToWarn the node on which to issue warnings on