Skip to content

Commit

Permalink
Avoid strange bug with let when it's inline
Browse files Browse the repository at this point in the history
  • Loading branch information
propensive committed Oct 25, 2024
1 parent 53fe83a commit 06d948f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/vacuous.Optional.scala
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ extension [ValueType](optional: Optional[ValueType])

if absent then alternative else block(using vouch(using Unsafe))

inline def let[ValueType2](inline lambda: ValueType => ValueType2): Optional[ValueType2] =
def let[ValueType2](lambda: ValueType => ValueType2): Optional[ValueType2] =
if absent then Unset else lambda(vouch(using Unsafe))

inline def letGiven[ValueType2](inline block: ValueType ?=> ValueType2): Optional[ValueType2] =
Expand Down

0 comments on commit 06d948f

Please sign in to comment.