ladybird/Userland/Shell
Daniel Bertalan d7b6cc6421 Everywhere: Prevent risky implicit casts of (Nonnull)RefPtr
Our existing implementation did not check the element type of the other
pointer in the constructors and move assignment operators. This meant
that some operations that would require explicit casting on raw pointers
were done implicitly, such as:
- downcasting a base class to a derived class (e.g. `Kernel::Inode` =>
  `Kernel::ProcFSDirectoryInode` in Kernel/ProcFS.cpp),
- casting to an unrelated type (e.g. `Promise<bool>` => `Promise<Empty>`
  in LibIMAP/Client.cpp)

This, of course, allows gross violations of the type system, and makes
the need to type-check less obvious before downcasting. Luckily, while
adding the `static_ptr_cast`s, only two truly incorrect usages were
found; in the other instances, our casts just needed to be made
explicit.
2021-09-03 23:20:23 +02:00
..
Tests Tests: Run each test in their respective directories 2021-06-22 18:54:40 +04:30
AST.cpp AK: Rename create<T> => make_ref_counted<T> 2021-09-03 02:36:09 +02:00
AST.h AK: Rename create<T> => make_ref_counted<T> 2021-09-03 02:36:09 +02:00
Builtin.cpp AK: Rename create<T> => make_ref_counted<T> 2021-09-03 02:36:09 +02:00
CMakeLists.txt Everywhere: Add component declarations 2021-06-17 11:03:51 +02:00
Execution.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
Formatter.cpp Shell: Convert StringBuilder::appendf() => AK::Format 2021-05-07 21:12:09 +02:00
Formatter.h Shell: Implement formatting for Heredocs 2021-04-29 20:25:56 +02:00
Forward.h Shell: Add support for heredocs 2021-04-29 20:25:56 +02:00
ImmediateFunctions.cpp AK: Rename create<T> => make_ref_counted<T> 2021-09-03 02:36:09 +02:00
Job.cpp Everywhere: Use "the SerenityOS developers." in copyright headers 2021-04-29 00:59:26 +02:00
Job.h Shell: Hide job times behind SHELL_JOB_DEBUG flag 2021-05-21 12:05:34 +04:30
main.cpp Shell: Remove dbgln related to process group IDs 2021-08-12 22:42:50 +02:00
NodeVisitor.cpp Shell: Add support for heredocs 2021-04-29 20:25:56 +02:00
NodeVisitor.h Shell: Add support for heredocs 2021-04-29 20:25:56 +02:00
Parser.cpp Everywhere: Prevent risky implicit casts of (Nonnull)RefPtr 2021-09-03 23:20:23 +02:00
Parser.h Everywhere: Prevent risky implicit casts of (Nonnull)RefPtr 2021-09-03 23:20:23 +02:00
Shell.cpp Userland: Migrate to argument-less deferred_invoke 2021-09-02 03:47:47 +04:30
Shell.h Shell: Add unalias builtin 2021-07-13 11:57:11 +04:30
SyntaxHighlighter.cpp LibWeb+LibSyntax: Implement nested syntax highlighters 2021-06-07 14:45:49 +04:30
SyntaxHighlighter.h LibWeb+LibSyntax: Implement nested syntax highlighters 2021-06-07 14:45:49 +04:30