blob: ab355e70a6ac7efe8638f79e006ff8cc532150c1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
// Copyright (C) 2016 Kevin Gibbons. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
description: Regular expression literals should not compare as equal even if they appear in the same source position.
esid: sec-regular-expression-literals-runtime-semantics-evaluation
---*/
function makeRegExp() {
return /(?:)/;
}
assert.notSameValue(makeRegExp(), makeRegExp());
var values = [];
for (var i = 0; i < 2; ++i) {
values[i] = /(?:)/;
}
assert.notSameValue(values[0], values[1]);
reportCompare(0, 0);
|