Skip to content

Commit cba26c1

Browse files
type piracy on Interval.lower/upper for downstream compat
1 parent 0056bc3 commit cba26c1

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

src/domains.jl

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,15 @@
1-
import DomainSets: Interval, Ball
1+
import DomainSets: Interval, Ball, infimum, supremum
22

33
@deprecate IntervalDomain(a,b) Interval(a,b)
4-
@deprecate CircleDomain() Ball()
4+
@deprecate CircleDomain() Ball()
5+
6+
# type piracy on Interval for downstream compatibility to be reverted once upgrade is complete
7+
function Base.getproperty(domain::Interval, sym::Symbol)
8+
if sym === :lower
9+
return infimum(domain) # or domain.left also defined by IntervalSets.jl
10+
elseif sym === :upper
11+
return supremum(domain) # or domain.right
12+
else
13+
return getfield(domain, sym)
14+
end
15+
end

0 commit comments

Comments
 (0)