Implement typed dictionaries
This commit is contained in:
@@ -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" }
|
||||
Reference in New Issue
Block a user