diff options
author | Zahary Karadjov <zahary@gmail.com> | 2020-03-29 02:17:47 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2020-04-01 19:38:44 +0200 |
commit | 0521f98486a6a95b388864747d584ddd5bf68391 (patch) | |
tree | bc9238c0bcc6edf0ba6b94b510c1ce65cb663454 /tests | |
parent | f3be5a716fff715bd46f6f0293db04eb2f0f832d (diff) | |
download | Nim-0521f98486a6a95b388864747d584ddd5bf68391.tar.gz |
Hrm, the new errors highlighted some code that seems to be broken
New issue: since `Table[A, B]` allocates its backing storage with `newSeq[KeyValuePair[A, B]]`, it's no longer legal to create a table with `not nil` types used as either keys or values.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/collections/ttables.nim | 2 | ||||
-rw-r--r-- | tests/discard/tneedsdiscard_in_for.nim | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/tests/collections/ttables.nim b/tests/collections/ttables.nim index a59707865..2a590dd26 100644 --- a/tests/collections/ttables.nim +++ b/tests/collections/ttables.nim @@ -80,7 +80,7 @@ block thashes: # Test with range block: type - R = range[1..10] + R = range[0..9] var t = initTable[R,int]() # causes warning, why? t[1] = 42 # causes warning, why? t[2] = t[1] + 1 diff --git a/tests/discard/tneedsdiscard_in_for.nim b/tests/discard/tneedsdiscard_in_for.nim index 499b06009..ab5216150 100644 --- a/tests/discard/tneedsdiscard_in_for.nim +++ b/tests/discard/tneedsdiscard_in_for.nim @@ -8,7 +8,7 @@ type Rgba8 = object proc premultiply*(c: var Rgba8): var Rgba8 = - discard + return c type App = ref object |