Clever "if let" assignment breaks in Swift 5.6.1 on Linux
Closed this issue · 1 comments
OurBigAdventure commented
This clever little if statement in Cleaner.swift line 36:
if let headWhitelist, let dirtHead = dirtyDocument.head(), let cleanHead = clean.head() {
specifically changing it to:
if let headWhitelist = headWhitelist, let dirtHead = dirtyDocument.head(), let cleanHead = clean.head() {
would solve the issue.
Aloisius commented
For reference, the if let x {}
shorthand for shadowing an optional was introduced in Swift 5.7.
Either the README need to be updated to note Swift 5.7 is required or this fixed.