-
Notifications
You must be signed in to change notification settings - Fork 12
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
fix: improve golang externs #1133
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,4 +47,12 @@ module TestStrings { | |
expect y == [1,2,3,4,5]; | ||
} | ||
|
||
// ensure that FileIO error are returned properly, and not a panic! or the like | ||
// This fails to fail on Windows+Dotnet, becasue \ instead of / | ||
// method {:test} TestBadFileIO() | ||
// { | ||
// var x := WriteBytesToFile("/../../MyFile", [1,2,3,4,5]); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why commented code? Shouldn't we remove it? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should add a comment |
||
// expect x.Failure?; | ||
// } | ||
|
||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume 0 is okay, but why not return error in the method signature?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because what else could the caller do but pretend it was zero?
None of the other languages had this issue, and so like "get current time" it seems silly to return an error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, Go returns error with output instead of separately? Maybe
-1
if not err?