visitGenericTypeParamExpr method
Implementation
@override
Uint8List visitGenericTypeParamExpr(GenericTypeParameterExpr expr) {
final bytesBuilder = BytesBuilder();
final idBytes = visitIdentifierExpr(expr.id);
bytesBuilder.add(idBytes);
if (expr.superType != null) {
bytesBuilder.addByte(1); // bool: hasSuperType
final superTypeBytes = visitNominalTypeExpr(expr.superType!);
bytesBuilder.add(superTypeBytes);
} else {
bytesBuilder.addByte(0); // bool: hasSuperType
}
return bytesBuilder.toBytes();
}