Commit d10419e
fix(codegen): version exception variable names in nested try/except
Exception variables in catch clauses now use _variableVersions tracking
to avoid CS0136 when nested try/except blocks use the same `as` name.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent 2e548af commit d10419e
3 files changed
Lines changed: 51 additions & 3 deletions
File tree
- src
- Sharpy.Compiler.Tests/Integration/TestFixtures/exception_handling
- Sharpy.Compiler/CodeGen
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
Lines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1801 | 1801 | | |
1802 | 1802 | | |
1803 | 1803 | | |
1804 | | - | |
1805 | | - | |
1806 | 1804 | | |
1807 | 1805 | | |
1808 | 1806 | | |
1809 | 1807 | | |
1810 | 1808 | | |
1811 | 1809 | | |
1812 | | - | |
| 1810 | + | |
| 1811 | + | |
| 1812 | + | |
| 1813 | + | |
| 1814 | + | |
| 1815 | + | |
| 1816 | + | |
| 1817 | + | |
| 1818 | + | |
| 1819 | + | |
| 1820 | + | |
| 1821 | + | |
| 1822 | + | |
| 1823 | + | |
| 1824 | + | |
| 1825 | + | |
| 1826 | + | |
| 1827 | + | |
| 1828 | + | |
| 1829 | + | |
| 1830 | + | |
| 1831 | + | |
| 1832 | + | |
1813 | 1833 | | |
| 1834 | + | |
| 1835 | + | |
| 1836 | + | |
| 1837 | + | |
| 1838 | + | |
| 1839 | + | |
| 1840 | + | |
| 1841 | + | |
| 1842 | + | |
| 1843 | + | |
| 1844 | + | |
1814 | 1845 | | |
1815 | 1846 | | |
1816 | 1847 | | |
1817 | 1848 | | |
| 1849 | + | |
1818 | 1850 | | |
1819 | 1851 | | |
1820 | 1852 | | |
1821 | 1853 | | |
1822 | 1854 | | |
1823 | 1855 | | |
| 1856 | + | |
1824 | 1857 | | |
1825 | 1858 | | |
1826 | 1859 | | |
| |||
0 commit comments