From: Jean Privat Date: Tue, 25 Nov 2014 22:56:25 +0000 (-0500) Subject: Merge: standard: Clean warnings X-Git-Tag: v0.6.11~16 X-Git-Url: http://nitlanguage.org Merge: standard: Clean warnings Just enough cleaning to get rid of all those warnings. Pull-Request: #921 Reviewed-by: Jean Privat Reviewed-by: Lucas Bajolet Reviewed-by: Alexis Laferrière --- a136f1013340b3bd8948cc34ad1e4f3ff3f3a855 diff --cc lib/standard/collection/hash_collection.nit index 92b8d5c,23f3b81..d389c5a --- a/lib/standard/collection/hash_collection.nit +++ b/lib/standard/collection/hash_collection.nit @@@ -16,21 -16,21 +16,21 @@@ module hash_collectio import array # A HashCollection is an array of HashNode[K] indexed by the K hash value -private abstract class HashCollection[K: Object, N: HashNode[Object]] - super ArrayCapable[nullable N] +private abstract class HashCollection[K: Object] + type N: HashNode[K] - private var array: nullable NativeArray[nullable N] = null # Used to store items - private var capacity: Int = 0 # Size of _array - private var the_length: Int = 0 # Number of items in the map + var array: nullable NativeArray[nullable N] = null # Used to store items + var capacity: Int = 0 # Size of _array + var the_length: Int = 0 # Number of items in the map - private var first_item: nullable N = null # First added item (used to visit items in nice order) - private var last_item: nullable N = null # Last added item (same) + var first_item: nullable N = null # First added item (used to visit items in nice order) + var last_item: nullable N = null # Last added item (same) # The last key accessed (used for cache) - private var last_accessed_key: nullable K = null + var last_accessed_key: nullable K = null # The last node accessed (used for cache) - private var last_accessed_node: nullable N = null + var last_accessed_node: nullable N = null # Return the index of the key k fun index_at(k: K): Int diff --cc lib/standard/string.nit index 48cb238,aeaa736..26251ce --- a/lib/standard/string.nit +++ b/lib/standard/string.nit @@@ -2116,10 -2125,17 +2123,16 @@@ en # Native strings are simple C char * extern class NativeString `{ char* `} - super StringCapable # Creates a new NativeString with a capacity of `length` new(length: Int) is intern + + # Get char at `index`. fun [](index: Int): Char is intern + + # Set char `item` at index. fun []=(index: Int, item: Char) is intern + + # Copy `self` to `dest`. fun copy_to(dest: NativeString, length: Int, from: Int, to: Int) is intern # Position of the first nul character. diff --cc tests/sav/test_new_native_alt1.res index ba6c5fe,3b1d0de..b05a1b7 --- a/tests/sav/test_new_native_alt1.res +++ b/tests/sav/test_new_native_alt1.res @@@ -1,4 -1,4 +1,4 @@@ - Runtime error: Cast failed. Expected `E`, got `Bool` (../lib/standard/collection/array.nit:782) -Runtime error: Cast failed. Expected `E`, got `Bool` (../lib/standard/collection/array.nit:792) ++Runtime error: Cast failed. Expected `E`, got `Bool` (../lib/standard/collection/array.nit:785) NativeString N Nit