title: "Case must be a string or an integral constant" error?
body: <p>OK, so here's my code :</p>
  
  <pre><code>//================================================
  // Constants
  //================================================
  
  const string YAML_STRING    =   "tag:yaml.org,2002:str";
  const string YAML_INT       =   "tag:yaml.org,2002:int";
  const string YAML_FLOAT     =   "tag:yaml.org,2002:float";
  const string YAML_BOOL      =   "tag:yaml.org,2002:bool";
  
  const string YAML_SEQ       =   "tag:yaml.org,2002:seq";
  const string YAML_SET       =   "tag:yaml.org,2002:set";
  
  const string YAML_MAP       =   "tag:yaml.org,2002:map";
  const string YAML_OMAP      =   "tag:yaml.org,2002:omap";
  const string YAML_PAIRS     =   "tag:yaml.org,2002:pairs";
  
  //================================================
  // Functions
  //================================================
  
  Value parseYAMLNode(Node n)
  {
      writeln(n.tag);
  
      switch (n.tag)
      {
          case YAML_STRING    :   return new Value(n.as!(string));
          case YAML_INT       :   return new Value(n.as!(long));
          case YAML_FLOAT     :   return new Value(n.as!(float));
          case YAML_BOOL      :   return new Value(n.as!(bool));
          default             :
          }
  
          // more code - omitted
  }
  </code></pre>
  
  <p>Once I decided to declare my case strings as consts (they are re-used, so I thought that'd be practical), it triggers a <code>Case must be a string or an integral constant</code> error.</p>
  
  <p>Why is that? How can this be fixed?</p>