Skip to content

Commit 0fb2739

Browse files
authored
Merge pull request #36373 from slavapestov/add-name-lookup-test
Add test for relaxed circularity check from parse-time lookup removal
2 parents d2495f8 + 99b86ac commit 0fb2739

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

test/NameLookup/name_lookup.swift

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -653,3 +653,12 @@ func sr9015() {
653653
let closure1 = { closure2() } // expected-error {{circular reference}} expected-note {{through reference here}} expected-note {{through reference here}}
654654
let closure2 = { closure1() } // expected-note {{through reference here}} expected-note {{through reference here}} expected-note {{through reference here}}
655655
}
656+
657+
func color(with value: Int) -> Int {
658+
return value
659+
}
660+
661+
func useColor() {
662+
let color = color(with: 123)
663+
_ = color
664+
}

0 commit comments

Comments
 (0)