diff --git a/NEWS.md b/NEWS.md index 8282e93a69e18..1a3d87c3df55b 100644 --- a/NEWS.md +++ b/NEWS.md @@ -44,6 +44,7 @@ Language changes a function like other operators. The dotted version `.-->` is now parsed as well. For backwards compatibility, `-->` still parses using its own expression head instead of `:call`. +* The `a[begin]` syntax now calls `firstindex(a,1)` rather than `first(axes(a,1))` ([#35779]). * `⌿` (U+233F) and `¦` (U+00A6) are now infix operators with times-like and plus-like precedence, respectively. Previously they were parsed as identifier characters ([#37973]). diff --git a/src/julia-syntax.scm b/src/julia-syntax.scm index 2d0aed8841661..49ce5b1fbf5dd 100644 --- a/src/julia-syntax.scm +++ b/src/julia-syntax.scm @@ -105,7 +105,7 @@ (if (null? tuples) (if (and last (= n 1)) `(call (top firstindex) ,a) - `(call (top first) (call (top axes) ,a ,n))) + `(call (top firstindex) ,a ,n)) (let ((dimno `(call (top +) ,(- n (length tuples)) ,.(map (lambda (t) `(call (top length) ,t)) tuples))))