Skip to content

Commit add0df8

Browse files
committed
Add a test for iterating a non-iterable object
Fixes #28392
1 parent c05fd20 commit add0df8

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

test/core.jl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6651,4 +6651,8 @@ function foo28326(a)
66516651
return true
66526652
end
66536653
end
6654-
@test foo28326(Vector(undef, 1))
6654+
@test foo28326(Vector(undef, 1))
6655+
6656+
# Issue #28392
6657+
struct Foo28392; end
6658+
@test_throws MethodError iterate(Foo28392())

0 commit comments

Comments
 (0)