From: Jean Privat Date: Thu, 25 Sep 2014 21:41:09 +0000 (-0400) Subject: Merge: New syntax for typed literal arrays X-Git-Tag: v0.6.9~15 X-Git-Url: http://nitlanguage.org Merge: New syntax for typed literal arrays Currenlty there is only ~~~.nit var a = [1, 2] # a isa Array[Int] var b = [1, true] # Type Error: ambiguous array type Int Bool var c = new Array[Object].with_items(1, true) # c isa Array[Object] ~~~ Now, there is also ~~~.nit var d = [1, true: Object] # d isa Array[Object] var e = [1, 2: Numeric] # e isa Array[Numeric] var f = [1, 2: Int] # f isa Array[Int] but with a warning for the useless `:Int` ~~~ Pull-Request: #772 Reviewed-by: Alexandre Terrasa Reviewed-by: Alexis Laferrière Reviewed-by: Lucas Bajolet --- f8d914fca3bb0f1952896f1c1c197df23b62ca07