Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Mullvad Browser
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
The Tor Project
Applications
Mullvad Browser
Commits
49a88bf6
Commit
49a88bf6
authored
23 years ago
by
pschwartau%netscape.com
Browse files
Options
Downloads
Patches
Plain Diff
Initial add.
parent
a42dc29a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
js2/tests/js/js2_0/Class/class-018-n.js
+72
-0
72 additions, 0 deletions
js2/tests/js/js2_0/Class/class-018-n.js
with
72 additions
and
0 deletions
js2/tests/js/js2_0/Class/class-018-n.js
0 → 100644
+
72
−
0
View file @
49a88bf6
/*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an
* "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either expressed
* or implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation.
* All Rights Reserved.
*
* Contributor(s): pschwartau@netscape.com
* Date: 2001-08-13
*
* SUMMARY: Negative test: class A should not see a global object variable
* if the latter is defined too late (before the first instance of A is defined)
*/
//-----------------------------------------------------------------------------
var
bug
:
String
=
'
(none)
'
;
var
summary
:
String
=
"
Negative test: accessing object var before it's defined
"
;
var
cnFAILURE
:
String
=
'
Expected an exception to be thrown, but none was -
'
;
class
A
{
var
obj
:
Object
;
constructor
function
A
()
{
obj
=
objB
;
}
}
class
B
{
var
obj
:
Object
;
constructor
function
B
()
{
obj
=
{};
}
}
class
C
{
var
obj
:
Object
;
constructor
function
C
()
{
obj
=
new
A
;
}
}
printBugNumber
(
bug
);
printStatus
(
summary
);
var
objC
=
new
C
;
// creates a new A; but this depends on objB...
var
objB
=
new
B
;
// WE SHOULD NEVER REACH THIS POINT -
reportFailure
(
cnFAILURE
);
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