We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
const
mutable
Currently, const-per-field annotations are not allowed by the interface, but it would be nice to support this.
The way this would be implemented is by allowing the annotation through here:
FieldFlags.jl/src/FieldFlags.jl
Lines 154 to 165 in 6267ca5
as well as simply not generating the various setindex! branches here:
setindex!
Lines 239 to 256 in 6267ca5
Annotating a field with const currently doesn't error, but the field is ignored entirely, so adding this shouldn't break anything:
julia> @bitfield mutable struct Foo const a:2 b:3 end julia> methods(Foo) # 3 methods for type constructor: [1] Foo() @ none:0 [2] Foo(t::Foo_fields) @ none:0 [3] Foo(b::Union{Bool, Int128, Int16, Int32, Int64, Int8, UInt128, UInt16, UInt32, UInt64, UInt8}) @ none:0
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Currently,
const
-per-field annotations are not allowed by the interface, but it would be nice to support this.The way this would be implemented is by allowing the annotation through here:
FieldFlags.jl/src/FieldFlags.jl
Lines 154 to 165 in 6267ca5
as well as simply not generating the various
setindex!
branches here:FieldFlags.jl/src/FieldFlags.jl
Lines 239 to 256 in 6267ca5
Annotating a field with
const
currently doesn't error, but the field is ignored entirely, so adding this shouldn't break anything:The text was updated successfully, but these errors were encountered: