Skip to content
Better HN
Top
Best
Ask
Show
New
Jobs
Search
⌘K
0 points
donatj
4y ago
0 comments
Save
Share
Isn’t that the same behavior/pattern for traits though? At least it’s consistent.
0 comments
1 comments · 1 top-level
top
newest
oldest
pdenton
4y ago
That was easy to test, and no. class_exists returns false for traits and they can't be used as parameter types. It throws a TypeError when I do that (even though the instance I pass uses the trait).
j
/
k
navigate · click thread line to collapse