The following issues were found

Userland/Libraries/LibJS/Runtime/Temporal/PlainDatePrototype.cpp
1 issues
syntax error
Error

Line: 74

              }

// 3.3.3 get Temporal.PlainDate.prototype.calendar, https://tc39.es/proposal-temporal/#sec-get-temporal.plaindate.prototype.calendar
JS_DEFINE_NATIVE_FUNCTION(PlainDatePrototype::calendar_getter)
{
    // 1. Let temporalDate be the this value.
    // 2. Perform ? RequireInternalSlot(temporalDate, [[InitializedTemporalDate]]).
    auto* temporal_date = typed_this(global_object);
    if (vm.exception())

            

Reported by Cppcheck.

Userland/Libraries/LibJS/Runtime/Temporal/PlainDateTimePrototype.cpp
1 issues
syntax error
Error

Line: 75

              }

// 5.3.3 get Temporal.PlainDateTime.prototype.calendar, https://tc39.es/proposal-temporal/#sec-get-temporal.plaindatetime.prototype.calendar
JS_DEFINE_NATIVE_FUNCTION(PlainDateTimePrototype::calendar_getter)
{
    // 1. Let dateTime be the this value.
    // 2. Perform ? RequireInternalSlot(dateTime, [[InitializedTemporalDateTime]]).
    auto* date_time = typed_this(global_object);
    if (vm.exception())

            

Reported by Cppcheck.

Userland/Libraries/LibJS/Runtime/Temporal/PlainMonthDayPrototype.cpp
1 issues
syntax error
Error

Line: 57

              }

// 10.3.3 get Temporal.PlainMonthDay.prototype.calendar, https://tc39.es/proposal-temporal/#sec-get-temporal.plainmonthday.prototype.calendar
JS_DEFINE_NATIVE_FUNCTION(PlainMonthDayPrototype::calendar_getter)
{
    // 1. Let monthDay be the this value.
    // 2. Perform ? RequireInternalSlot(monthDay, [[InitializedTemporalMonthDay]]).
    auto* month_day = typed_this(global_object);
    if (vm.exception())

            

Reported by Cppcheck.

Userland/Libraries/LibJS/Runtime/Temporal/PlainTimePrototype.cpp
1 issues
syntax error
Error

Line: 60

              }

// 4.3.3 get Temporal.PlainTime.prototype.calendar, https://tc39.es/proposal-temporal/#sec-get-temporal.plaintime.prototype.calendar
JS_DEFINE_NATIVE_FUNCTION(PlainTimePrototype::calendar_getter)
{
    // 1. Let temporalTime be the this value.
    // 2. Perform ? RequireInternalSlot(temporalTime, [[InitializedTemporalTime]]).
    auto* temporal_time = typed_this(global_object);
    if (vm.exception())

            

Reported by Cppcheck.

Userland/Libraries/LibJS/Runtime/Temporal/PlainYearMonthPrototype.cpp
1 issues
syntax error
Error

Line: 62

              }

// 9.3.3 get Temporal.PlainYearMonth.prototype.calendar, https://tc39.es/proposal-temporal/#sec-get-temporal.plainyearmonth.prototype.calendar
JS_DEFINE_NATIVE_FUNCTION(PlainYearMonthPrototype::calendar_getter)
{
    // 1. Let yearMonth be the this value.
    // 2. Perform ? RequireInternalSlot(yearMonth, [[InitializedTemporalYearMonth]]).
    auto* year_month = typed_this(global_object);
    if (vm.exception())

            

Reported by Cppcheck.

Userland/Libraries/LibJS/Runtime/Temporal/TimeZoneConstructor.cpp
1 issues
syntax error
Error

Line: 86

              }

// 11.3.2 Temporal.TimeZone.from ( item ), https://tc39.es/proposal-temporal/#sec-temporal.timezone.from
JS_DEFINE_NATIVE_FUNCTION(TimeZoneConstructor::from)
{
    auto item = vm.argument(0);

    // 1. Return ? ToTemporalTimeZone(item).
    return to_temporal_time_zone(global_object, item);

            

Reported by Cppcheck.

Userland/Libraries/LibJS/Runtime/Temporal/TimeZonePrototype.cpp
1 issues
syntax error
Error

Line: 55

              }

// 11.4.3 get Temporal.TimeZone.prototype.id, https://tc39.es/proposal-temporal/#sec-get-temporal.timezone.prototype.id
JS_DEFINE_NATIVE_FUNCTION(TimeZonePrototype::id_getter)
{
    // 1. Let timeZone be the this value.
    auto time_zone = vm.this_value(global_object);

    // 2. Return ? ToString(timeZone).

            

Reported by Cppcheck.

Userland/Libraries/LibJS/Runtime/Temporal/ZonedDateTimePrototype.cpp
1 issues
syntax error
Error

Line: 85

              }

// 6.3.3 get Temporal.ZonedDateTime.prototype.calendar, https://tc39.es/proposal-temporal/#sec-get-temporal.zoneddatetime.prototype.calendar
JS_DEFINE_NATIVE_FUNCTION(ZonedDateTimePrototype::calendar_getter)
{
    // 1. Let zonedDateTime be the this value.
    // 2. Perform ? RequireInternalSlot(zonedDateTime, [[InitializedTemporalZonedDateTime]]).
    auto* zoned_date_time = typed_this(global_object);
    if (vm.exception())

            

Reported by Cppcheck.

Userland/Libraries/LibJS/Runtime/TypedArrayConstructor.cpp
1 issues
syntax error
Error

Line: 59

              }

// 23.2.2.1 %TypedArray%.from ( source [ , mapfn [ , thisArg ] ] ), https://tc39.es/ecma262/#sec-%typedarray%.from
JS_DEFINE_NATIVE_FUNCTION(TypedArrayConstructor::from)
{
    auto constructor = vm.this_value(global_object);
    if (!constructor.is_constructor()) {
        vm.throw_exception<TypeError>(global_object, ErrorType::NotAConstructor, constructor.to_string_without_side_effects());
        return {};

            

Reported by Cppcheck.

Userland/Libraries/LibJS/Runtime/TypedArrayPrototype.cpp
1 issues
syntax error
Error

Line: 195

              }

// 23.2.3.18 get %TypedArray%.prototype.length, https://tc39.es/ecma262/#sec-get-%typedarray%.prototype.length
JS_DEFINE_NATIVE_GETTER(TypedArrayPrototype::length_getter)
{
    auto typed_array = typed_array_from_this(global_object);
    if (!typed_array)
        return {};
    auto* array_buffer = typed_array->viewed_array_buffer();

            

Reported by Cppcheck.