Skip to content
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

Fix assertions in constructor #80

Merged
merged 7 commits into from
Mar 23, 2022
Merged

Fix assertions in constructor #80

merged 7 commits into from
Mar 23, 2022

Conversation

bkamins
Copy link
Member

@bkamins bkamins commented Mar 22, 2022

@nalimilan I propose to revert b3036f8 you have made. I do not understand why it is needed and currently it leads to an incorrect result:

julia> PooledArray([1 2; 3 4], Int8)
ERROR: TypeError: in typeassert, expected Vector{Int8}, got a value of type Matrix{Int8}

@bkamins bkamins requested a review from nalimilan March 22, 2022 08:17
@bkamins bkamins changed the title Remove assertions in constructor Fix assertions in constructor Mar 22, 2022
src/PooledArrays.jl Outdated Show resolved Hide resolved
@bkamins
Copy link
Member Author

bkamins commented Mar 22, 2022

OK - I see you wanted the constructor to be type stable

src/PooledArrays.jl Outdated Show resolved Hide resolved
test/runtests.jl Outdated Show resolved Hide resolved
test/runtests.jl Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Mar 22, 2022

Codecov Report

Merging #80 (5026aef) into main (53f57d4) will increase coverage by 1.51%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main      #80      +/-   ##
==========================================
+ Coverage   87.00%   88.51%   +1.51%     
==========================================
  Files           1        1              
  Lines         331      331              
==========================================
+ Hits          288      293       +5     
+ Misses         43       38       -5     
Impacted Files Coverage Δ
src/PooledArrays.jl 88.51% <100.00%> (+1.51%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 53f57d4...5026aef. Read the comment docs.

test/runtests.jl Outdated Show resolved Hide resolved
@bkamins bkamins merged commit ec427e8 into main Mar 23, 2022
@bkamins bkamins deleted the bkamins-patch-3 branch March 23, 2022 13:34
@bkamins
Copy link
Member Author

bkamins commented Mar 23, 2022

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants