-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* many bugfixes for js fixes #12672, fixes #14153, closes #14123, closes #11331, fixes #11783, fixes #13966, fixes #14087, fixes #14117, closes #12256. mostly fixes the fact that it was allowed to assign to newly created temp variables. additionally attempts to get rid of null initialized seqs/strings (though they might pop up here and there); this simplifies a lot of things and makes code size smaller. even if null seqs/strings pop up here and there it's still better than all those bugs existing. * formatting fixes * CI fixes * more CI fixes
- Loading branch information
Showing
10 changed files
with
240 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
discard """ | ||
output: "" | ||
""" | ||
|
||
proc foo = | ||
var x: seq[seq[int]] | ||
for row in x.mitems: | ||
let i = 1 | ||
echo row | ||
inc row[i-1] | ||
|
||
foo() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
discard """ | ||
output: ''' | ||
index 5 not in 0 .. 2 | ||
index 5 not in 0 .. 2 | ||
''' | ||
""" | ||
|
||
var x = @[1, 2, 3] | ||
|
||
try: | ||
echo x[5] | ||
except IndexError: | ||
echo getCurrentExceptionMsg() | ||
except: | ||
doAssert false | ||
|
||
try: | ||
x[5] = 8 | ||
except IndexError: | ||
echo getCurrentExceptionMsg() | ||
except: | ||
doAssert false |
Oops, something went wrong.