}else if(constant instanceof Double){
returnType = new WeaselGenericClass(compiler.baseTypes.doubleClass);
instructionList.add(line, new WeaselInstructionLoadConstDouble((Double)constant));
}else if(constant instanceof String){
returnType = new WeaselGenericClass(compiler.baseTypes.getStringClass());
instructionList.add(line, new WeaselInstructionLoadConstString((String)constant));
}else if(constant==null){
returnType = null;
instructionList.add(line, new WeaselInstructionLoadNull());
}else{
throw new WeaselCompilerException(line, "Unknow constant %s", constant);