Merge: standard: Clean warnings
authorJean Privat <jean@pryen.org>
Tue, 25 Nov 2014 22:56:25 +0000 (17:56 -0500)
committerJean Privat <jean@pryen.org>
Tue, 25 Nov 2014 22:56:25 +0000 (17:56 -0500)
Just enough cleaning to get rid of all those warnings.

Pull-Request: #921
Reviewed-by: Jean Privat <jean@pryen.org>
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>

1  2 
lib/standard/collection/array.nit
lib/standard/collection/hash_collection.nit
lib/standard/kernel.nit
lib/standard/math.nit
lib/standard/string.nit
tests/sav/test_new_native_alt1.res

Simple merge
@@@ -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
Simple merge
Simple merge
  
  # 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.
@@@ -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