mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-03 23:25:20 +00:00
LibJS: Initial class implementation; allow super expressions in object
literal methods; add EnvrionmentRecord fields and methods to LexicalEnvironment Adding EnvrionmentRecord's fields and methods lets us throw an exception when |this| is not initialized, which occurs when the super constructor in a derived class has not yet been called, or when |this| has already been initialized (the super constructor was already called).
This commit is contained in:
committed by
Andreas Kling
parent
a535d58cac
commit
7533fd8b02
@@ -76,7 +76,7 @@ Value SymbolConstructor::call(Interpreter& interpreter)
|
||||
|
||||
Value SymbolConstructor::construct(Interpreter& interpreter)
|
||||
{
|
||||
interpreter.throw_exception<TypeError>(ErrorType::NotACtor, "Symbol");
|
||||
interpreter.throw_exception<TypeError>(ErrorType::NotAConstructor, "Symbol");
|
||||
return {};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user