We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b52a4e1 commit a67341cCopy full SHA for a67341c
swift/extractor/infra/SwiftDispatcher.h
@@ -80,11 +80,10 @@ class SwiftDispatcher {
80
void emitUnknown(E* entity) {
81
auto label = assignNewLabel(entity);
82
using Trap = BindingTrapOf<E>;
83
- Trap entry{label};
84
- // check that Trap only has the `id` field by using structured binding on it
85
- auto [id] = entry;
86
- std::ignore = id;
87
- emit(entry);
+ static_assert(sizeof(Trap) == sizeof(label),
+ "Binding traps of unknown entities must only have the `id` field (the class "
+ "should be empty in schema.yml)");
+ emit(Trap{label});
88
emit(ElementIsUnknownTrap{label});
89
}
90
0 commit comments