mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-27 02:05:07 +02:00
LibJS: Treat concise methods as non-constructors
This commit is contained in:
committed by
Andreas Kling
parent
1179e40d3f
commit
df8ead1f12
Notes:
github-actions[bot]
2026-03-20 21:00:10 +00:00
Author: https://github.com/olliehcrook 🔰 Commit: https://github.com/LadybirdBrowser/ladybird/commit/df8ead1f121 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/8306
@@ -96,7 +96,7 @@ public:
|
||||
bool has_simple_parameter_list() const { return shared_data().m_has_simple_parameter_list; }
|
||||
|
||||
// Equivalent to absence of [[Construct]]
|
||||
virtual bool has_constructor() const override { return kind() == FunctionKind::Normal && !shared_data().m_is_arrow_function; }
|
||||
virtual bool has_constructor() const override { return kind() == FunctionKind::Normal && !shared_data().m_is_arrow_function && !m_is_method; }
|
||||
|
||||
virtual Vector<LocalVariable> const& local_variables_names() const override { return shared_data().m_local_variables_names; }
|
||||
|
||||
@@ -151,6 +151,7 @@ private:
|
||||
mutable OwnPtr<ClassData> m_class_data;
|
||||
|
||||
mutable bool m_may_need_lazy_prototype_instantiation { false };
|
||||
bool m_is_method { false };
|
||||
};
|
||||
|
||||
template<>
|
||||
|
||||
Reference in New Issue
Block a user