Implement typed dictionaries
This commit is contained in:
parent
906a4e9db9
commit
9853a69144
86 changed files with 3071 additions and 193 deletions
|
|
@ -0,0 +1,5 @@
|
|||
func test():
|
||||
var my_dictionary: Dictionary[int, String] = { 1: "one", 2: "two", 3: "three" }
|
||||
var inferred_dictionary := { 1: "one", 2: "two", 3: "three" } # This is Dictionary[int, String].
|
||||
print(my_dictionary)
|
||||
print(inferred_dictionary)
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
GDTEST_OK
|
||||
{ 1: "one", 2: "two", 3: "three" }
|
||||
{ 1: "one", 2: "two", 3: "three" }
|
||||
Loading…
Add table
Add a link
Reference in a new issue