1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 04:37:34 +00:00

LibIDL: Emit an error when two decls of the same function are present

Duplicates can show up when copy-pasting IDL snippets into existing IDL
files, and the resulting error is extremely useless and misleading.
This commit makes it so the parser catches these cases, and emits a more
helpful error like "Overload set 'instantiate' contains multiple
identical declarations".
This commit is contained in:
Ali Mohammad Pur 2024-02-16 04:57:03 +03:30 committed by Andreas Kling
parent bc301b6f40
commit 971e466521
3 changed files with 30 additions and 2 deletions

View file

@ -61,7 +61,7 @@ private:
ByteString import_base_path;
ByteString filename;
StringView input;
GenericLexer lexer;
LineTrackingLexer lexer;
HashTable<NonnullOwnPtr<Interface>>& top_level_interfaces();
HashTable<NonnullOwnPtr<Interface>> interfaces;