You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 9414cd8
Browse filesBrowse the repository at this point in the historyBrowse files
Read the code of traits in analysed files like the using class's own
PreservedPropertiesVisitor scans traits like classes and stores the scan on
the trait node. A class using traits attaches its own scan to its calls
instead of what they keep. At the first such call, PreservedPropertiesResolver
parses the traits' files, merges their methods (unless the class declares
them itself), properties, closures and what they hand out into the class's
scan, and annotates the class's calls with the result. A trait used with
adaptations, one that uses other traits, one that cannot be parsed, and one
that is not in an analysed file leave the class unsupported, as before.
Amp-Thread-ID: https://ampcode.com/threads/T-01a1ffd7-32dc-7043-b3ac-2d8cf42d2441
@@ -46,6 +49,12 @@ final class PreservedPropertiesClassScan
46
49
/** @var array<string, bool> declared instance properties, each with whether only the class's own code can write it */
47
50
publicarray$properties = [];
48
51
52
+
/** @var array<string, array{bool, bool}> declared instance properties, each with whether it is private and whether it is protected */
53
+
privatearray$propertyVisibility = [];
54
+
55
+
/** @var list<Node\Stmt\TraitUse> the trait uses of the class, whose code is merged in before its calls are annotated */
56
+
publicarray$traitUses = [];
57
+
49
58
/** @var array<string, true> protected properties of a final class with a parent, which only the class's own code writes unless the parent declares them too */
50
59
privatearray$unlessParentDeclares = [];
51
60
@@ -66,7 +75,7 @@ final class PreservedPropertiesClassScan
66
75
publicarray$methodParameters = [];
67
76
68
77
/**
69
-
* Magic __get/__set/__unset, a hooked property or a trait: code nothing summarises can write the
78
+
* Magic __get/__set/__unset, a hooked property or a trait whose code is not known: code nothing summarises can write the
70
79
* properties, so the calls keep and forget what they did before.
0 commit comments