Skip to content

Conversation

@martinlasek
Copy link

@martinlasek martinlasek commented Feb 15, 2018

PostgreSQL would not compile due to: Ambiguous use of 'popLast()'

Here's a working (workaround?)

x.popFirst()!
returns the first element of the collection if not empty.
Otherwise nil.
Plus removes first element from x.

x.first!
returns the first element of the collection if not empty.
Otherwise nil.
Does not removes first element from x.

That's why I added: x.removeFirst() afterwards.

Toolchain

Swift Development Snapshot 2018-02-13 (a)

PostgreSQL would not compile due to: `Ambiguous use of 'popLast()'`
Here's a working (workaround?)

`x.popFirst()!` returns the first element of the collection if not empty. Otherwise nil. Plus removes first element from x.
`x.first!` returns the first element of the collection if not empty. Otherwise nil. Does not removes first element from x. That's why I added:
`x.removeFirst()` afterwards.
@tanner0101 tanner0101 added the bug Something isn't working label Feb 16, 2018
@tanner0101 tanner0101 self-assigned this Feb 16, 2018
@tanner0101
Copy link
Member

@martinlasek I'm no longer seeing this issue in the 02-14 toolchain. 🤔 Maybe they fixed it?

@tanner0101
Copy link
Member

Not seeing any CI fails on #20 either (which should be using latest Swift 4.1 copy)

I'm going to guess this was a fluke in 02-13 and close this for now. Let me know if you see it again!

@tanner0101 tanner0101 closed this Feb 16, 2018
@tanner0101 tanner0101 added this to the 1.0.0-beta.3 milestone Feb 16, 2018
@martinlasek
Copy link
Author

martinlasek commented Feb 16, 2018

It's funny, because I just downloaded the newest toolchain (I think yesterday) and it must've been just before they released a newer one I guess - but you're right! I'm now on 02-15 now and it's gone 😊👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants