LibJS: Explicitly disallow references in ThrowCompletionOr
This will be disallowed by TRY soon, but the compile error produced by this requirement will pinpoint the errant line more accurately.
This commit is contained in:
parent
a59ebdac2d
commit
3de75f6436
Notes:
sideshowbarker
2024-07-17 03:03:37 +09:00
Author: https://github.com/trflynn89 Commit: https://github.com/SerenityOS/serenity/commit/3de75f6436 Pull-request: https://github.com/SerenityOS/serenity/pull/16999 Reviewed-by: https://github.com/alimpfard ✅ Reviewed-by: https://github.com/linusg ✅
2 changed files with 3 additions and 0 deletions
|
@ -7,6 +7,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <AK/Concepts.h>
|
||||
#include <AK/Types.h>
|
||||
|
||||
#define JS_DECLARE_NATIVE_FUNCTION(name) \
|
||||
|
@ -282,6 +283,7 @@ struct PartialDurationRecord;
|
|||
};
|
||||
|
||||
template<typename T>
|
||||
requires(!IsLvalueReference<T>)
|
||||
class ThrowCompletionOr;
|
||||
|
||||
template<class T>
|
||||
|
|
|
@ -246,6 +246,7 @@ private:
|
|||
namespace JS {
|
||||
|
||||
template<typename ValueType>
|
||||
requires(!IsLvalueReference<ValueType>)
|
||||
class [[nodiscard]] ThrowCompletionOr {
|
||||
public:
|
||||
ThrowCompletionOr()
|
||||
|
|
Loading…
Add table
Reference in a new issue