Skip to content

Commit 21c3f77

Browse files
committed
Add regression tests for rdar://58495602
1 parent 6cdcd00 commit 21c3f77

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
@propertyWrapper
2+
public struct WrapGod<T> {
3+
private var value: T
4+
5+
public init(wrappedValue: T) {
6+
value = wrappedValue
7+
}
8+
9+
public var wrappedValue: T {
10+
get { value }
11+
set { value = newValue }
12+
}
13+
}
14+
15+
final class TestCaseRunner {}
16+
17+
struct ContentView { // expected-note {{'init(runner:)' declared here}}
18+
@WrapGod var runner: TestCaseRunner
19+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// rdar://58495602: The order used to matter here. If use compiles before def
2+
// then you got a DI error. If def compiles before use then you got a linker error.
3+
4+
// RUN: %target-swift-frontend -emit-sil -verify %s %S/Inputs/di_property_wrappers_errors_multifile_2.swift
5+
// RUN: %target-swift-frontend -emit-sil -verify %S/Inputs/di_property_wrappers_errors_multifile_2.swift %s
6+
7+
let contentView = ContentView() // expected-error {{missing argument for parameter 'runner' in call}}
8+

0 commit comments

Comments
 (0)