Skip to content

Commit 3fd26cc

Browse files
committed
fixup! scopes: Disallow constructing empty UnionScope
1 parent aed7f35 commit 3fd26cc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/scopes.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,8 @@
123123
us_es1_multi_ch = Dagger.tochunk(nothing, OSProc(), UnionScope(es1, es1))
124124
@test fetch(Dagger.@spawn exact_scope_test(us_es1_multi_ch)) == es1.processor
125125

126-
# No inner scopes
127-
@test UnionScope() isa UnionScope
126+
# No inner scopes (disallowed)
127+
@test_throws ArgumentError UnionScope()
128128

129129
# Same inner scope
130130
@test fetch(Dagger.@spawn exact_scope_test(us_es1_ch, us_es1_ch)) == es1.processor
@@ -165,7 +165,7 @@
165165
@test Dagger.scope(:any) isa AnyScope
166166
@test Dagger.scope(:default) == DefaultScope()
167167
@test_throws ArgumentError Dagger.scope(:blah)
168-
@test Dagger.scope(()) == UnionScope()
168+
@test_throws ArgumentError Dagger.scope(())
169169

170170
@test Dagger.scope(worker=wid1) ==
171171
Dagger.scope(workers=[wid1])

0 commit comments

Comments
 (0)