-
Notifications
You must be signed in to change notification settings - Fork 13
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
Basic usage of parsing string fails with isNil
is a user defined error
#23
Comments
also when compiling with --nilseqs:on
gives
|
I think that error is because of using 4 instead of 3 quotes on line 3:
|
@kaushalmodi you're correct my bad thanks |
The issue is still not technically closed, right? It would still fail on devel when not using that switch, right? |
Yeah, the error message is strange but it's cause by the four |
I'm getting the same error message for this code: import strutils
import strformat
import parseopt
var
filename: string
var p = initOptParser()
for kind, key, val in p.getopt():
case kind
of cmdArgument:
filename = key
of cmdLongOption:
discard
of cmdShortOption:
discard
of cmdEnd:
discard
if filename.isNil():
echo "Error: provide a filename"
quit(1)
echo "Success" How should I check if a string is nil? |
You can't any longer, you just check if it is equal to EDIT: Of course in that case you should simply check if |
This should be fixed in 6ed000e |
error:
I'm using nim head
The text was updated successfully, but these errors were encountered: