Skip to content

Commit 349bb58

Browse files
committed
Fix missing arg to new in LBC inner constructor
The type of `f` is not enough, the value is also needed if it's a closure
1 parent fe0f06d commit 349bb58

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/PreallocationTools.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ allocated as needed and then cached within `b` for subsequent usage.
8383
struct LazyBufferCache{F<:Function}
8484
bufs::Dict # a dictionary mapping types to buffers
8585
lengthmap::F
86-
LazyBufferCache(f::F=identity) where {F<:Function} = new{F}(Dict()) # start with empty dict
86+
LazyBufferCache(f::F=identity) where {F<:Function} = new{F}(Dict(), f) # start with empty dict
8787
end
8888

8989
# override the [] method

0 commit comments

Comments
 (0)