Skip to content

Commit

Permalink
Fix bug in @ReadOnly(bits: ...) (#120)
Browse files Browse the repository at this point in the history
Fixes a typo in the macro defintion of the ReadOnly unbounded range
macro which caused it to use the WriteOnly macro expansion.
  • Loading branch information
ShenghaiWang authored Sep 17, 2024
1 parent 4357d91 commit ced9f4d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/MMIO/MMIOMacros.swift
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ where Range: RangeExpression, Range.Bound: BinaryInteger, Value: BitFieldProject

@attached(accessor)
public macro ReadOnly<Value>(bits: UnboundedRange, as: Value.Type = Never.self) =
#externalMacro(module: "MMIOMacros", type: "WriteOnlyMacro")
#externalMacro(module: "MMIOMacros", type: "ReadOnlyMacro")
where Value: BitFieldProjectable

@attached(accessor)
Expand Down

0 comments on commit ced9f4d

Please sign in to comment.