Skip to content

Conversation

@FedericoCeratto
Copy link
Member

No description provided.

@Araq
Copy link
Member

Araq commented May 7, 2018

Use "" instead of nil please.

@Varriount Varriount merged commit cb87bba into nim-lang:devel Jun 1, 2018
@FedericoCeratto FedericoCeratto deleted the patch-6 branch October 15, 2018 18:14
@skilchen
Copy link
Contributor

@FedericoCeratto you should update the example once more since nil is no longer a valid value for strings. Currently your example produces:

let db = open("mytest.db", nil, nil, nil) Error: type mismatch: got <string, nil, nil, nil> but expected one of: proc open(f: var File; filehandle: FileHandle; mode: FileMode = fmRead): bool first type mismatch at position: 1 required type: var File but expression '"mytest.db"' is of type: string proc open(f: var File; filename: string; mode: FileMode = fmRead; bufSize: int = -1): bool first type mismatch at position: 1 required type: var File but expression '"mytest.db"' is of type: string proc open(filename: string; mode: FileMode = fmRead; bufSize: int = -1): File first type mismatch at position: 2 required type: FileMode but expression 'nil' is of type: nil proc open(connection, user, password, database: string): DbConn first type mismatch at position: 2 required type: string but expression 'nil' is of type: nil expression: open("mytest.db", nil, nil, nil) 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

4 participants