Skip to content

Commit c092864

Browse files
authored
Merge pull request swiftlang#39741 from xedin/rdar-80630127-test
[TypeChecker] NFC: Add a test-case for rdar://80630127
2 parents 402bc34 + 55a75ed commit c092864

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
// RUN: %target-typecheck-verify-swift -target %target-cpu-apple-macosx10.15 -swift-version 5 -disable-availability-checking
2+
// REQUIRES: objc_interop
3+
// REQUIRES: OS=macosx
4+
5+
import SwiftUI
6+
7+
struct FullScreenView<Content>: View where Content: View {
8+
@State private var showFullScreen: Bool = false
9+
10+
var x: Double = 0
11+
var y: Double = 0
12+
13+
var content: () -> Content
14+
15+
// Body of this view used to cause rapid memory use.
16+
var body: some View {
17+
ZStack {
18+
VStack {
19+
HStack {
20+
Button {
21+
} label: {
22+
Text("a")
23+
}
24+
.offset(x: x, y: y)
25+
}
26+
}
27+
}
28+
.fullScreenCover(isPresented: $showFullScreen) {
29+
ZStack {
30+
VStack {
31+
HStack {
32+
Button {
33+
34+
} label: {
35+
Text("a")
36+
}
37+
}
38+
}
39+
}
40+
}
41+
}
42+
}

0 commit comments

Comments
 (0)