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 show for const properties of type Vector or Symbol #29

Merged
merged 4 commits into from
Nov 10, 2023

Conversation

SteffenPL
Copy link
Contributor

@SteffenPL SteffenPL commented Nov 10, 2023

It seems that

@proto mutable struct Foo
    const x::Vector{Int} = Int[]
end

show(Foo())

causes an error since x will neither be a Base.RefValue nor a String.

This two-line PR should fix this.

Copy link

codecov bot commented Nov 10, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (d1db7a1) 97.50% compared to head (e5ffa70) 97.50%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master      #29   +/-   ##
=======================================
  Coverage   97.50%   97.50%           
=======================================
  Files           2        2           
  Lines         120      120           
=======================================
  Hits          117      117           
  Misses          3        3           
Files Coverage Δ
src/ProtoStruct.jl 97.47% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@BeastyBlacksmith
Copy link
Owner

Thanks!

@BeastyBlacksmith BeastyBlacksmith merged commit 872efcc into BeastyBlacksmith:master Nov 10, 2023
13 checks passed
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