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

`proc isNil*(x: Any): bool =` should be updated with non nil string, seq #8916

Closed
timotheecour opened this issue Sep 8, 2018 · 2 comments

Comments

Projects
None yet
2 participants
@timotheecour
Copy link
Contributor

commented Sep 8, 2018

proc isNil*(x: Any): bool =
  ## `isNil` for an any `x` that represents a sequence, string, cstring,
  ## proc or some pointer type.
  assert x.rawType.kind in {tyString, tyCString, tyRef, tyPtr, tyPointer,
                            tySequence, tyProc}
  result = isNil(cast[ppointer](x.value)[])
@dom96

This comment has been minimized.

Copy link
Member

commented Sep 8, 2018

Seems like a simple PR, wouldn't it have been easier to just create it?

@dom96 dom96 added the Easy label Sep 8, 2018

timotheecour added a commit to timotheecour/Nim that referenced this issue Sep 10, 2018

timotheecour added a commit to timotheecour/Nim that referenced this issue Sep 10, 2018

@timotheecour

This comment has been minimized.

Copy link
Contributor Author

commented Sep 10, 2018

not so simple apparently, see #8942

@dom96 dom96 added the Hacktoberfest label Oct 2, 2018

Vindaar added a commit to Vindaar/Nim that referenced this issue Oct 12, 2018

fixes nim-lang#8916 by removing `tyString`, `tySeq`, mod. marshal, ty…
…peinfo

Need to check in `typeinfo` for nil of the underlying pointer.
In marshal don't have to check for nil of seq anymore.

@Araq Araq closed this in #9341 Oct 13, 2018

Araq added a commit that referenced this issue Oct 13, 2018

fixes #8916 by fixing typeinfo and marshal. (#9341)
* fixes #8916 by removing `tyString`, `tySeq`, mod. marshal, typeinfo

Need to check in `typeinfo` for nil of the underlying pointer.
In marshal don't have to check for nil of seq anymore.

* remove reference to string, sequence in `isNil` doc string

krux02 added a commit to krux02/Nim that referenced this issue Oct 15, 2018

fixes nim-lang#8916 by fixing typeinfo and marshal. (nim-lang#9341)
* fixes nim-lang#8916 by removing `tyString`, `tySeq`, mod. marshal, typeinfo

Need to check in `typeinfo` for nil of the underlying pointer.
In marshal don't have to check for nil of seq anymore.

* remove reference to string, sequence in `isNil` doc string

narimiran added a commit to narimiran/Nim that referenced this issue Oct 31, 2018

fixes nim-lang#8916 by fixing typeinfo and marshal. (nim-lang#9341)
* fixes nim-lang#8916 by removing `tyString`, `tySeq`, mod. marshal, typeinfo

Need to check in `typeinfo` for nil of the underlying pointer.
In marshal don't have to check for nil of seq anymore.

* remove reference to string, sequence in `isNil` doc string

narimiran added a commit to narimiran/Nim that referenced this issue Nov 1, 2018

fixes nim-lang#8916 by fixing typeinfo and marshal. (nim-lang#9341)
* fixes nim-lang#8916 by removing `tyString`, `tySeq`, mod. marshal, typeinfo

Need to check in `typeinfo` for nil of the underlying pointer.
In marshal don't have to check for nil of seq anymore.

* remove reference to string, sequence in `isNil` doc string
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.