Commit 29aef76
Phase 1 — Tuple star-unpack (#509):
- Fix GenerateStarUnpacking to handle TupleType via ItemN access
- Fix CheckStarUnpacking rest element type for heterogeneous tuples
- Add tuple_star_unpack_tail and tuple_star_unpack_middle test fixtures
Phase 2 — Nested functions (#507):
- Register nested FunctionSymbols in enclosing scope during type checking
- Emit nested functions as C# local functions (LocalFunctionStatementSyntax)
- Save/restore method scope state around local function generation
- Add nested_function_basic and nested_function_closure test fixtures
Phase 3 — collections.namedtuple (#508):
- Add Namedtuple stub to Sharpy.Core Collections module
- Detect namedtuple("X", [...]) pattern in TypeChecker, synthesize TypeSymbol
- Generate C# record class with ToString() override for Python repr format
- Exempt namedtuple assignments from module-level statement validation
- Add namedtuple_basic, namedtuple_print, match_named_tuple test fixtures
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent f1c8222 commit 29aef76
26 files changed
Lines changed: 647 additions & 50 deletions
File tree
- src
- Sharpy.Compiler.Tests/Integration/TestFixtures
- expressions
- functions
- generators
- pattern_matching
- Sharpy.Compiler
- CodeGen
- Semantic
- Validation
- Services
- Sharpy.Core/Collections
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
0 commit comments