Patterns: flatten objects without pragmas

This commit is contained in:
Emery Hemingway 2022-03-16 11:58:10 -05:00
parent 829c0bf61a
commit 405f3dd5c2
1 changed files with 0 additions and 7 deletions

View File

@ -113,13 +113,6 @@ proc `?`*(T: static typedesc): Pattern =
result = ?DCompound(
orKind: DCompoundKind.arr,
arr: arr)
elif T is object:
var dict = DCompoundDict()
for key, val in fieldPairs(default T):
dict.entries[key.toSymbol(Ref)] = ?(typeOf val)
result = ?DCompound(
orKind: DCompoundKind.dict,
dict: dict)
else:
grab() # capture any value