checkType method

  1. @override
ConstructType checkType(
  1. CType t
)
override

Implementation

@override
ConstructType checkType(CType t) {
  if (t is RecClass) {
    final ty = t.getType();
    if (ty == null) {
      throw 'type mismatch with uninitialized type';
    }
    return ty;
  }
  throw "type mismatch: type on the wire ${t.name}, expect type $name";
}