Skip to content

Add unit tests for nested generic type grammar #393

Closed

Description

@LunaStev

Why

split_top_level_generic_args and parse_type in front/parser/src/parser/types.rs handle nested generic, pointer, array, and qualified type spellings. They have no focused unit-test suite even though imports and generic monomorphization depend on them.

Scope

  • Add positive tests for nested ptr, array, qualified names, and multiple generic arguments.
  • Add negative tests for empty arguments, unbalanced chevrons, invalid array lengths, extra commas, and trailing garbage.
  • Assert the exact TokenType or WaveType representation.
  • Do not redesign type syntax.

Likely files

  • front/parser/src/parser/types.rs
  • A new parser test module

Completion criteria

  • Nested and qualified types are covered.
  • Malformed nesting and separators return None without panic.
  • Existing primitive and custom type behavior is preserved.
  • cargo test -p parser --locked passes.

Activity

  1. added
    good first issue
    needs testing
    on Aug 28, 2026
  2. self-assigned this
    on Sep 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

good first issueneeds testing

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions