This repository has been archived by the owner on Oct 15, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 340
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ee02cb6
commit a34dd03
Showing
4 changed files
with
50 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
deps/chakrashim/core/test/fieldopts/objptrcopyprop_typescript.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
//------------------------------------------------------------------------------------------------------- | ||
// Copyright (C) Microsoft. All rights reserved. | ||
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information. | ||
//------------------------------------------------------------------------------------------------------- | ||
|
||
function foo(obj, obj2) | ||
{ | ||
if (obj.x == 10) | ||
{ | ||
obj = obj2; | ||
|
||
if (obj.x == 20) | ||
{ | ||
return; | ||
} | ||
} | ||
|
||
return obj.x; | ||
} | ||
|
||
|
||
function test() | ||
{ | ||
var o1 = new Object(); | ||
var o2 = new Object(); | ||
|
||
o1.x = 10; | ||
o2.x = 30; | ||
|
||
for (var i = 0; i < 1000; i++) | ||
{ | ||
var result = foo(o1,o2); | ||
if (result != 30) | ||
{ | ||
WScript.Echo("FAILED\n"); | ||
return; | ||
} | ||
} | ||
|
||
WScript.Echo("Passed"); | ||
} | ||
|
||
test(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters