1
0
forked from Mirror/wren

added extra arguments to list constructors for default size/ value

This commit is contained in:
root
2016-07-17 12:01:50 +10:00
parent 5418e4f8f3
commit 45d9794476
3 changed files with 46 additions and 0 deletions

View File

@ -0,0 +1,8 @@
var list = List.new(5)
System.print(list.count) // expect: 5
System.print(list) // expect: [null, null, null, null, null]
var list2 = List.new(5, 2)
System.print(list2.count) // expect: 5
System.print(list2) // expect: [2, 2, 2, 2, 2]