We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 49e2321 commit 14cd4f0Copy full SHA for 14cd4f0
test/direct.jl
@@ -240,6 +240,21 @@ kwargs = (; name = 3)
240
@test cool_name[1] == (42,)
241
@test collect(cool_name[2]) == [:name => 3]
242
243
+name = 3
244
+@named cool_name = foo(42; name)
245
+@test cool_name[1] == (42,)
246
+@test collect(cool_name[2]) == [:name => name]
247
+@named cool_name = foo(; name)
248
+@test collect(cool_name) == [:name => name]
249
+
250
+ff = 3
251
+@named cool_name = foo(42; ff)
252
253
+@test collect(cool_name[2]) == [pp; :ff => ff]
254
255
+@named cool_name = foo(; ff)
256
+@test collect(cool_name) == [pp; :ff => ff]
257
258
foo(i; name) = (; i, name)
259
@named goo[1:3] = foo(10)
260
@test isequal(goo, [(i = 10, name = Symbol(:goo_, i)) for i in 1:3])
0 commit comments