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

"not nil" checking is not working with object construction expression. #6494

Closed
kvinwang opened this issue Oct 10, 2017 · 1 comment
Closed

Comments

@kvinwang
Copy link
Contributor

type
    PipeOrNil = ref object
    Pipe = PipeOrNil not nil

    ProcessOrNil = ref object
        stdin: Pipe
    Process = ProcessOrNil not nil

let a: PipeOrNil = nil
let b = Process(stdin: a) # expect compile error here, but it compiles ok


proc newProcess(stdin: Pipe): Process =
    Process(stdin: stdin)

let c = newProcess(a)  # works fine this way
@Araq
Copy link
Member

Araq commented Nov 23, 2017

Still an issue.

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

No branches or pull requests

3 participants