@@ 110,17 110,17 @@
(let [inst @{:_meta @{:object-type :instance
:object-id (,make-object-id)}}]
# Recursively lookup defaults in prototype hierarchy
- (var source-of-defaults ,name)
+ (var source-of-defaults self)
(while source-of-defaults
(let [proto-id (get-in source-of-defaults [:_meta :object-id])
defaults (,get-proto-defaults proto-id)]
- (loop [[name default-value] :pairs defaults]
+ (loop [[default-key default-value] :pairs defaults]
# Ensure the value inserted into a new instance is
# distinct from any previous examples.
# Theoretically we might want to directly insert
# the value, but until the usecase arises we can
# always make a copy.
- (put inst name (,make-copy default-value))))
+ (put inst default-key (,make-copy default-value))))
# Recurse to grandparent
(set source-of-defaults (table/getproto source-of-defaults)))