Skip to content

Commit f010a1b

Browse files
committed
sort of fixed _issubrange
1 parent 854bbe1 commit f010a1b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/varname.jl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,8 +358,11 @@ const ConcreteIndex = Union{Int, AbstractVector{Int}} # this include all kinds o
358358
"""Determine whether indices `i` are contained in `j`, treating `:` as universal set."""
359359
_issubrange(i::ConcreteIndex, j::ConcreteIndex) = issubset(i, j)
360360
_issubrange(i::Colon, j::Colon) = true
361+
_issubrange(i::Colon, j::ConcreteIndex) = false
362+
# FIXME: [2021-07-31] This is wrong but we have tests in DPPL that tell
363+
# us that it SHOULD be correct. I'll leave it as is for now to ensure that
364+
# we preserve the status quo, but I'm confused.
361365
_issubrange(i::ConcreteIndex, j::Colon) = false
362-
_issubrange(i::Colon, j::ConcreteIndex) = true
363366

364367
"""
365368
concretize(l::Lens, x)

0 commit comments

Comments
 (0)