-
-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(transient): adds conj!, assoc!, dissoc! and pop! for transients #62
Conversation
ac13d76
to
78ad135
Compare
78ad135
to
b5c4338
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## transient #62 +/- ##
=============================================
- Coverage 61.29% 59.54% -1.75%
=============================================
Files 52 55 +3
Lines 7926 7655 -271
=============================================
- Hits 4858 4558 -300
- Misses 3068 3097 +29 ☔ View full report in Codecov by Sentry. |
src/jank/clojure/core.jank
Outdated
([coll x] | ||
(native/raw "__value = visit_object | ||
( | ||
[=](auto const typed_t, auto const head) -> object_ptr |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like these were changed from [&]
to [=]
, but I think they can be []
. Did you hit an issue with that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, the compiler's mad at me:
➜ jank git:(transient-vector-fns) ✗ ./bin/compile
[1/1] Generating classes/core-libraries
input_line_94:18:29: error: variable 'call_574' cannot be implicitly captured in a lambda with no capture-default specified
{ throw call_574; }
^
input_line_94:9:243: note: 'call_574' declared here
jank::profile::timer __timer{ "dissoc_BANG__558" };auto const map_575(jank::make_box<jank::runtime::obj::persistent_array_map>(jank::runtime::detail::in_place_unique{}, jank::make_array_box<object_ptr>(const_561, coll),2));auto const call_574(jank::runtime::dynamic_call(ex_info_559->deref(), const_560, map_575));object_ptr native_573{ obj::nil::nil_const() };{ object_ptr __value{ obj::nil::nil_const() };__value = visit_object
^
input_line_94:11:19: note: lambda expression begins here
[](auto const typed_t, auto const key) -> object_ptr
^
input_line_94:11:20: note: capture 'call_574' by value
[](auto const typed_t, auto const key) -> object_ptr
^
call_574
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, that's because you're throwing coll
instead of typed_coll
. Since you have the fully typed version as the first param to the lambda, we can use that rather than also capturing the erased version.
9d89d8e
to
fcf48b2
Compare
fcf48b2
to
8ab39ce
Compare
…ansient-vector-fns
No description provided.