Skip to content
Better HN
Top
New
Best
Ask
Show
Jobs
Search
⌘K
undefined | Better HN
0 points
donatj
4y ago
0 comments
Share
Isn’t that the same behavior/pattern for traits though? At least it’s consistent.
0 comments
default
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