Closed mildsunrise closed 10 months ago
Shouldn't we move this to the semantic-sdp instead?
point. will do
how about extending X.expand()
to no only support pojos but also check if the input is already an X
and return it directly.
Then add a X.clone(x) => X.expand(x).clone()
?
we have copypasted this pattern (or variations of it) throughout the code:
to parse
thing
into a SemanticSDP object, or clone it if already parsed.This PR extracts this pattern into functions at
Utils
. It simplifies the code and satisfies the type checker.