Commit 6042784
committed
Sema: Tweak re-declaration checking behavior to match old logic
The parser's own re-declaration checking for local declarations has
slightly different behavior than Sema's re-declaration check.
Whereas Sema rejects this:
class C {
let x = 123
func x() {}
}
The parser accepts this:
func f() {
let x = 123
func x() {}
}
With Sema's check now handling both cases, fudge the behavior to
match the parser in the local case.1 parent 2765df6 commit 6042784
File tree
2 files changed
+10
-0
lines changed- lib/Sema
- test/Sema
2 files changed
+10
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
572 | 572 | | |
573 | 573 | | |
574 | 574 | | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
575 | 580 | | |
576 | 581 | | |
577 | 582 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
96 | 101 | | |
0 commit comments