Package kiss.lang

Examples of kiss.lang.Type.validate()


  public void validate() {
    int n=types.length;
    if (n<2) throw new KissException("Union must have at least two members");
    for (int i=0; i<n; i++) {
      Type t=types[i];
      t.validate();
      if (t instanceof Nothing) throw new KissException(this+ " should not contain Nothing type");
    }
  }

  @Override
View Full Code Here


  public void validate() {
    int n=types.length;
    if (n<2) throw new KissException("Intersection must have at least two members");
    for (int i=0; i<n; i++) {
      Type t=types[i];
      t.validate();
      if (t instanceof Anything) throw new KissException(this+ " should not contain Anything");
    }
  }

}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.