Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
test262
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pmaksimo
test262
Commits
705940d2
Commit
705940d2
authored
9 years ago
by
Leonardo Balter
Browse files
Options
Downloads
Patches
Plain Diff
Add tests for Subclassing the built-in Proxy Object
parent
d30e98df
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
test/language/subclassing/Proxy/no-prototype-throws.js
+32
-0
32 additions, 0 deletions
test/language/subclassing/Proxy/no-prototype-throws.js
with
32 additions
and
0 deletions
test/language/subclassing/Proxy/no-prototype-throws.js
0 → 100644
+
32
−
0
View file @
705940d2
// Copyright (C) 2016 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: 14.5.14
description: The Proxy Object is not subclasseable without a prototype
info: >
14.5.14 Runtime Semantics: ClassDefinitionEvaluation
5. If ClassHeritageopt is not present, then
...
6. Else
...
e. If superclass is null, then
...
f. Else if IsConstructor(superclass) is false, throw a TypeError exception.
g. Else
...
ii. Let protoParent be Get(superclass, "prototype").
iii. ReturnIfAbrupt(protoParent).
iv. If Type(protoParent) is neither Object nor Null, throw a TypeError exception.
26.2.1 The Proxy Constructor
The Proxy constructor is the %Proxy% intrinsic object and the initial value of
the Proxy property of the global object. When called as a constructor it
creates and initializes a new proxy exotic object. Proxy is not intended to be
called as a function and will throw an exception when called in that manner.
---*/
assert
.
throws
(
TypeError
,
function
()
{
class
P
extends
Proxy
{}
});
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment