Package weasel.interpreter

Examples of weasel.interpreter.WeaselGenericClass.canCastTo()


    if(returnType.getBaseClass().isPrimitive()){
      instructions.addWithoutLine(new WeaselInstructionCast(returnWrapper.getBaseClass().getByteName()));
    }
   
    if(!returnWrapper.getBaseClass().isInterface() && !expectWrapper.getBaseClass().isInterface()){
      if(returnWrapper.canCastTo(expectWrapper) && !expectWrapper.canCastTo(returnWrapper)){
        throw new WeaselCompilerException(instructions.getLine(), "Types %s and %s are not compatible", returnType, weaselGenericClass);
      }
    }
   
    instructions.addWithoutLine(new WeaselInstructionCast(expectWrapper.getBaseClass().getRealName()));
View Full Code Here


    if(returnType.getBaseClass().isPrimitive()){
      instructionList.addWithoutLine(new WeaselInstructionCast(returnWrapper.getBaseClass().getByteName()));
    }
   
    if(!returnWrapper.getBaseClass().isInterface() && !expectWrapper.getBaseClass().isInterface()){
      if(returnWrapper.canCastTo(expectWrapper) && !expectWrapper.canCastTo(returnWrapper)){
        throw new WeaselCompilerException(instructionList.getLine(), "Types %s and %s are not compatible", returnType, weaselGenericClass);
      }
    }
   
    instructionList.addWithoutLine(new WeaselInstructionCast(expectWrapper.getBaseClass().getRealName()));
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.