Esempio n. 1
0
 @NotNull
 public static JetType getDefaultType(IElementType constantType) {
   if (constantType == JetNodeTypes.INTEGER_CONSTANT) {
     return JetStandardLibrary.getInstance().getIntType();
   } else if (constantType == JetNodeTypes.FLOAT_CONSTANT) {
     return JetStandardLibrary.getInstance().getDoubleType();
   } else if (constantType == JetNodeTypes.BOOLEAN_CONSTANT) {
     return JetStandardLibrary.getInstance().getBooleanType();
   } else if (constantType == JetNodeTypes.CHARACTER_CONSTANT) {
     return JetStandardLibrary.getInstance().getCharType();
   } else if (constantType == JetNodeTypes.NULL) {
     return JetStandardClasses.getNullableNothingType();
   } else {
     throw new IllegalArgumentException("Unsupported constant type: " + constantType);
   }
 }