$traits property

Set<Type> get $traits

Returns the traits implemented by this node.

Implementation

Set<Type> get $traits => _traits ??= cursed.$class.superinterfaces
    .where((i) => i.superinterfaces.any((j) => j.reflectedType == Trait))
    .map((i) => i.reflectedType)
    .toSet();