Skip to content

Conversation

@fglock
Copy link
Owner

@fglock fglock commented Oct 29, 2025

The issue was that Dereference.handleArrowHashDeref() and handleArrowArrayDeref() were not checking the HINT_STRICT_REFS flag at compile time. They always used the strict versions of dereference methods, even when 'no strict refs' was active.

Changes:

  • RuntimeScalar.java: Added 8 new *NonStrict methods for hash/array operations (hashDerefDeleteNonStrict, hashDerefExistsNonStrict, arrayDerefGetNonStrict, arrayDerefDeleteNonStrict, arrayDerefExistsNonStrict, arrayDerefGetSliceNonStrict)

  • RuntimeBaseProxy.java: Added 6 NonStrict method overrides to delegate to lvalue

  • Dereference.java: Updated handleArrowHashDeref() and handleArrowArrayDeref() to check isStrictOptionEnabled(HINT_STRICT_REFS) and call appropriate methods

Test Results:

  • t/op/multideref.t: Now passes 56/65 tests (was 2/65)
  • The first 3 strict refs tests now pass
  • Remaining failures are unrelated (local/autovivification issues)

Fixes symbolic references like: $a[0]{k} where $a[0] = 'foo' creates $foo{k}

The issue was that Dereference.handleArrowHashDeref() and handleArrowArrayDeref()
were not checking the HINT_STRICT_REFS flag at compile time. They always used
the strict versions of dereference methods, even when 'no strict refs' was active.

Changes:
- RuntimeScalar.java: Added 8 new *NonStrict methods for hash/array operations
  (hashDerefDeleteNonStrict, hashDerefExistsNonStrict, arrayDerefGetNonStrict,
  arrayDerefDeleteNonStrict, arrayDerefExistsNonStrict, arrayDerefGetSliceNonStrict)

- RuntimeBaseProxy.java: Added 6 NonStrict method overrides to delegate to lvalue

- Dereference.java: Updated handleArrowHashDeref() and handleArrowArrayDeref()
  to check isStrictOptionEnabled(HINT_STRICT_REFS) and call appropriate methods

Test Results:
- t/op/multideref.t: Now passes 56/65 tests (was 2/65)
- The first 3 strict refs tests now pass
- Remaining failures are unrelated (local/autovivification issues)

Fixes symbolic references like: $a[0]{k} where $a[0] = 'foo' creates $foo{k}
@fglock fglock merged commit 4f0328a into master Oct 29, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants