diff --git a/BeefLibs/corlib/src/Range.bf b/BeefLibs/corlib/src/Range.bf index 1023a33a..dae1f2a1 100644 --- a/BeefLibs/corlib/src/Range.bf +++ b/BeefLibs/corlib/src/Range.bf @@ -217,9 +217,9 @@ namespace System struct IndexRange : RangeExpression { - public Index mStart; - public Index mEnd; - public bool mIsClosed; + protected Index mStart; + protected Index mEnd; + protected bool mIsClosed; public this() { diff --git a/BeefLibs/corlib/src/Span.bf b/BeefLibs/corlib/src/Span.bf index 88e70617..af5f8cce 100644 --- a/BeefLibs/corlib/src/Span.bf +++ b/BeefLibs/corlib/src/Span.bf @@ -177,7 +177,7 @@ namespace System get { T* start; - switch (range.mStart) + switch (range.[Friend]mStart) { case .FromFront(let offset): Debug.Assert((uint)offset <= (uint)mLength); @@ -187,9 +187,9 @@ namespace System start = mPtr + mLength - 1 - offset; } T* end; - if (range.mIsClosed) + if (range.[Friend]mIsClosed) { - switch (range.mEnd) + switch (range.[Friend]mEnd) { case .FromFront(let offset): Debug.Assert((uint)offset < (uint)mLength); @@ -201,7 +201,7 @@ namespace System } else { - switch (range.mEnd) + switch (range.[Friend]mEnd) { case .FromFront(let offset): Debug.Assert((uint)offset <= (uint)mLength); diff --git a/BeefLibs/corlib/src/String.bf b/BeefLibs/corlib/src/String.bf index b05c89c4..44b6bff6 100644 --- a/BeefLibs/corlib/src/String.bf +++ b/BeefLibs/corlib/src/String.bf @@ -3021,7 +3021,7 @@ namespace System get { char8* start; - switch (range.mStart) + switch (range.[Friend]mStart) { case .FromFront(let offset): Debug.Assert((uint)offset <= (uint)mLength); @@ -3031,9 +3031,9 @@ namespace System start = mPtr + mLength - 1 - offset; } char8* end; - if (range.mIsClosed) + if (range.[Friend]mIsClosed) { - switch (range.mEnd) + switch (range.[Friend]mEnd) { case .FromFront(let offset): Debug.Assert((uint)offset < (uint)mLength); @@ -3045,7 +3045,7 @@ namespace System } else { - switch (range.mEnd) + switch (range.[Friend]mEnd) { case .FromFront(let offset): Debug.Assert((uint)offset <= (uint)mLength);