File tree Expand file tree Collapse file tree 4 files changed +33
-9
lines changed
Expand file tree Collapse file tree 4 files changed +33
-9
lines changed Original file line number Diff line number Diff line change @@ -525,13 +525,8 @@ class TypeRefinementContextBuilder : private ASTWalker {
525525 // get expanded from macros attached to the parent declaration. We must
526526 // not eagerly expand the attached property wrappers to avoid request
527527 // cycles.
528- if (auto *pattern = dyn_cast<PatternBindingDecl>(D)) {
529- if (auto firstVar = pattern->getAnchoringVarDecl (0 )) {
530- // FIXME: We could narrow this further by detecting whether there are
531- // any macro expansions required to visit the CustomAttrs of the var.
532- if (firstVar->hasInitialValue () && !firstVar->isInitExposedToClients ())
533- return true ;
534- }
528+ if (isa<PatternBindingDecl>(D)) {
529+ return true ;
535530 }
536531
537532 return false ;
Original file line number Diff line number Diff line change 1616// CHECK-NEXT: {{^}} (decl versions=[10.52,+Inf) decl=someStaticPropertyInferredType
1717// CHECK-NEXT: {{^}} (decl_implicit versions=[10.51,+Inf) decl=multiPatternStaticPropertyA
1818// CHECK-NEXT: {{^}} (decl versions=[10.52,+Inf) decl=multiPatternStaticPropertyA
19- // CHECK-NEXT: {{^}} (decl versions=[10.52,+Inf) decl=someComputedProperty
19+ // CHECK-NEXT: {{^}} (decl_implicit versions=[10.51,+Inf) decl=someComputedProperty
20+ // CHECK-NEXT: {{^}} (decl versions=[10.52,+Inf) decl=someComputedProperty
2021// CHECK-NEXT: {{^}} (decl versions=[10.52,+Inf) decl=someOtherMethod()
2122@available ( OSX 10 . 51 , * )
2223class SomeClass {
@@ -61,7 +62,8 @@ func someFunction() { }
6162
6263// CHECK-NEXT: {{^}} (decl versions=[10.51,+Inf) decl=SomeProtocol
6364// CHECK-NEXT: {{^}} (decl versions=[10.52,+Inf) decl=protoMethod()
64- // CHECK-NEXT: {{^}} (decl versions=[10.52,+Inf) decl=protoProperty
65+ // CHECK-NEXT: {{^}} (decl_implicit versions=[10.51,+Inf) decl=protoProperty
66+ // CHECK-NEXT: {{^}} (decl versions=[10.52,+Inf) decl=protoProperty
6567@available ( OSX 10 . 51 , * )
6668protocol SomeProtocol {
6769 @available ( OSX 10 . 52 , * )
@@ -233,6 +235,8 @@ extension SomeClass {
233235 } ( )
234236}
235237
238+ // CHECK-NEXT: {{^}} (decl_implicit versions=[10.13,+Inf) decl=wrappedValue
239+
236240@propertyWrapper
237241struct Wrapper < T> {
238242 var wrappedValue : T
Original file line number Diff line number Diff line change 1+ import Foundation
2+ import Observation
3+
4+ @available ( SwiftStdlib 5 . 9 , * )
5+ @Observable final public class AnotherObservableClass {
6+ public var name : String
7+
8+ init ( name: String ) {
9+ self . name = name
10+ }
11+ }
Original file line number Diff line number Diff line change 1+ // REQUIRES: swift_swift_parser
2+
3+ // RUN: %target-swift-frontend -typecheck -parse-as-library -external-plugin-path %swift-plugin-dir#%swift-plugin-server -primary-file %s %S/Inputs/ObservableClass2.swift
4+
5+ // RUN: %target-swift-frontend -typecheck -parse-as-library -external-plugin-path %swift-plugin-dir#%swift-plugin-server %s -primary-file %S/Inputs/ObservableClass2.swift
6+
7+ // REQUIRES: observation
8+ // REQUIRES: concurrency
9+ // REQUIRES: objc_interop
10+ // UNSUPPORTED: use_os_stdlib
11+ // UNSUPPORTED: back_deployment_runtime
12+
13+ @available ( SwiftStdlib 5 . 9 , * )
14+ let x = AnotherObservableClass ( name: " Hello " )
You can’t perform that action at this time.
0 commit comments