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

Add none[T]() as alias to none(T) #7512

Merged
merged 4 commits into from
Apr 16, 2018
Merged

Add none[T]() as alias to none(T) #7512

merged 4 commits into from
Apr 16, 2018

Conversation

metagn
Copy link
Collaborator

@metagn metagn commented Apr 5, 2018

It's a direct alias in case there are PRs that change none(T), and deprecating or removing none(T) would be a bit of an off move

Could be used for using none[T] as a direct proc value instead of proc: auto = none(T)

@GULPF
Copy link
Member

GULPF commented Apr 6, 2018

Does those examples work? I don't think Nim has that kind of type inference. E.g this doesn't compile:

var s: seq[int] = newSeq()

@metagn
Copy link
Collaborator Author

metagn commented Apr 6, 2018

Oh, you're right

@Araq
Copy link
Member

Araq commented Apr 11, 2018

Please add test cases.

@metagn
Copy link
Collaborator Author

metagn commented Apr 11, 2018

Added some

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

Successfully merging this pull request may close these issues.

4 participants