Skip to content

Conversation

@steveklabnik
Copy link
Collaborator

…s (ADR-0029)

  • Change method lookup key from (Spur, Spur) to (StructId, Spur) to support anonymous structs which don't have stable names
  • Register methods when creating anonymous struct types via register_anon_struct_methods()
  • Add resolve_type_with_self() to resolve Self type to the anonymous struct's StructId in method signatures
  • Add preview feature gate (anon_struct_methods) for the feature
  • Extend InstData::AnonStructType with methods_start/methods_len fields
  • Update astgen to generate method FnDecl instructions for anonymous structs
  • Add spec paragraphs 4.14:10-15 for anonymous struct methods
  • Add 14 spec tests covering methods, Self type, associated functions, comptime parameter capture, and structural equality

All tests pass with 100% normative coverage.

Closes: rue-nj40.3

🤖 Generated with Claude Code

@steveklabnik steveklabnik enabled auto-merge January 4, 2026 18:09
…s (ADR-0029)

- Change method lookup key from (Spur, Spur) to (StructId, Spur) to support
  anonymous structs which don't have stable names
- Register methods when creating anonymous struct types via
  register_anon_struct_methods()
- Add resolve_type_with_self() to resolve Self type to the anonymous struct's
  StructId in method signatures
- Add preview feature gate (anon_struct_methods) for the feature
- Extend InstData::AnonStructType with methods_start/methods_len fields
- Update astgen to generate method FnDecl instructions for anonymous structs
- Add spec paragraphs 4.14:10-15 for anonymous struct methods
- Add 14 spec tests covering methods, Self type, associated functions,
  comptime parameter capture, and structural equality

All tests pass with 100% normative coverage.

Closes: rue-nj40.3

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@steveklabnik steveklabnik force-pushed the steveklabnik/push-qyspmozsoqmu branch from 65d103e to 791d287 Compare January 4, 2026 18:12
@steveklabnik steveklabnik added this pull request to the merge queue Jan 4, 2026
Merged via the queue into rue-language:trunk with commit 71f952f Jan 4, 2026
6 checks passed
@steveklabnik steveklabnik deleted the steveklabnik/push-qyspmozsoqmu branch January 4, 2026 18:22
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.

1 participant