Skip to content

Commit 4f93be1

Browse files
committed
Add regression test for rdar://57265336
There was a logic error causing us to place nominal types on the DeclsToFinalize list in the specific case where they were members of an extension of a class. Of course this kind of thing is indicative of bad design, and now, the whole DeclsToFinalize list is gone. Let's add a regression test for posterity.
1 parent b9c1def commit 4f93be1

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
public class Foo {}
2+
3+
extension Foo {
4+
public struct Nested {
5+
public init() {}
6+
}
7+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// RUN: %empty-directory(%t)
2+
// RUN: %target-swift-frontend -emit-module %S/Inputs/finalize-nested-types-other.swift -module-name other -emit-module-path %t/other.swiftmodule
3+
// RUN: %target-swift-frontend -typecheck %s -I %t
4+
5+
import other
6+
7+
let t = Foo.self
8+
let n = t.Nested()

0 commit comments

Comments
 (0)