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

Free Coding exercises not consistent #168

Open
aagd opened this issue Sep 22, 2020 · 1 comment
Open

Free Coding exercises not consistent #168

aagd opened this issue Sep 22, 2020 · 1 comment

Comments

@aagd
Copy link

aagd commented Sep 22, 2020

Some questions allow the creation of an empty array with var array:[String] = [], while some would need var array:[String] = [String]() to be valid.

@Carrione
Copy link
Contributor

Carrione commented Oct 18, 2020

This is solved by code - see Unwrap/Extensions/String-Variables.swift (line 102) https://github.com/twostraws/Unwrap/blob/main/Unwrap/Extensions/String-Variables.swift

// If folks use explicit type annotation for a collection backed up by an empty initializer, prefer removing the annotation.

replaced = replaced.replacingOccurrences(of: #":\[([A-Za-z]+)\] *= *\[\]"#, with: " = [$1]()", options: .regularExpression)

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