1 package polyglot.ext.pao.types; 2 3 import polyglot.ext.jl.types.PrimitiveType_c; 4 import polyglot.types.Type; 5 import polyglot.types.TypeSystem; 6 7 11 public class PaoPrimitiveType_c extends PrimitiveType_c 12 { 13 protected PaoPrimitiveType_c() { 14 super(); 15 } 16 17 public PaoPrimitiveType_c(TypeSystem ts, Kind kind) { 18 super(ts, kind); 19 } 20 21 26 public boolean descendsFromImpl(Type ancestor) { 27 return ts.equals(ancestor, ts.Object()); 28 } 29 30 35 public boolean isImplicitCastValidImpl(Type toType) { 36 return ts.equals(toType, ts.Object()) || 37 super.isImplicitCastValidImpl(toType); 38 } 39 40 45 public boolean isCastValidImpl(Type toType) { 46 return ts.equals(toType, ts.Object()) || super.isCastValidImpl(toType); 47 } 48 } 49 | Popular Tags |