diff --git a/Libraries/LibJS/Runtime/BigInt.cpp b/Libraries/LibJS/Runtime/BigInt.cpp index 4e01b4117a..30620c2785 100644 --- a/Libraries/LibJS/Runtime/BigInt.cpp +++ b/Libraries/LibJS/Runtime/BigInt.cpp @@ -30,7 +30,7 @@ ErrorOr BigInt::to_string() const } // 21.2.1.1.1 NumberToBigInt ( number ), https://tc39.es/ecma262/#sec-numbertobigint -ThrowCompletionOr number_to_bigint(VM& vm, Value number) +ThrowCompletionOr> number_to_bigint(VM& vm, Value number) { VERIFY(number.is_number()); @@ -39,7 +39,7 @@ ThrowCompletionOr number_to_bigint(VM& vm, Value number) return vm.throw_completion(ErrorType::BigIntFromNonIntegral); // 2. Return the BigInt value that represents ℝ(number). - return BigInt::create(vm, Crypto::SignedBigInteger { number.as_double() }).ptr(); + return BigInt::create(vm, Crypto::SignedBigInteger { number.as_double() }); } } diff --git a/Libraries/LibJS/Runtime/BigInt.h b/Libraries/LibJS/Runtime/BigInt.h index 50e6ff60b2..32fc97002b 100644 --- a/Libraries/LibJS/Runtime/BigInt.h +++ b/Libraries/LibJS/Runtime/BigInt.h @@ -35,6 +35,6 @@ private: Crypto::SignedBigInteger m_big_integer; }; -ThrowCompletionOr number_to_bigint(VM&, Value); +ThrowCompletionOr> number_to_bigint(VM&, Value); }