createObject method
Implementation
HTStruct createObject({
List<dynamic> positionalArgs = const [],
Map<String, dynamic> namedArgs = const {},
List<HTType> typeArgs = const [],
}) {
if (!isResolved) {
throw HTError.unresolvedNamedStruct(id!);
}
if (_self!.containsKey(InternalIdentifier.defaultConstructor)) {
final constructor =
_self!.memberGet(InternalIdentifier.defaultConstructor) as HTFunction;
return constructor.call(
positionalArgs: positionalArgs,
namedArgs: namedArgs,
typeArgs: typeArgs,
);
} else {
return _self!.clone();
}
}