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

Clever "if let" assignment breaks in Swift 5.6.1 on Linux #259

Open
OurBigAdventure opened this issue Jan 17, 2024 · 1 comment
Open

Clever "if let" assignment breaks in Swift 5.6.1 on Linux #259

OurBigAdventure opened this issue Jan 17, 2024 · 1 comment

Comments

@OurBigAdventure
Copy link

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
Copy link
Contributor

Aloisius commented Jan 20, 2024

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.

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

No branches or pull requests

2 participants