diff options
Diffstat (limited to 'js/src/jit-test/tests/ion/bug848803.js')
-rw-r--r-- | js/src/jit-test/tests/ion/bug848803.js | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/ion/bug848803.js b/js/src/jit-test/tests/ion/bug848803.js new file mode 100644 index 0000000000..09718882a9 --- /dev/null +++ b/js/src/jit-test/tests/ion/bug848803.js @@ -0,0 +1,34 @@ +var JSIL = {};
+JSIL.TypeNameParseState = function ()
+{
+ this.input = 15;
+ this.pos = 0
+};
+JSIL.TypeNameParseState.prototype.substr = function (e)
+{
+ return e;
+};
+JSIL.TypeNameParseState.prototype.moveNext = function ()
+{
+ this.pos += 1;
+ return this.pos < this.input;
+};
+JSIL.TypeNameParseResult = function () {};
+JSIL.ParseTypeNameImpl = function (n)
+{
+ var i = new JSIL.TypeNameParseState()
+ var u = new JSIL.TypeNameParseResult;
+ while (i.moveNext())
+ {
+ if (n)
+ {
+ while (true)
+ u.assembly = 1
+ }
+ u.assembly = i.substr(i.pos + 1);
+ }
+ return u
+};
+
+var u = JSIL.ParseTypeNameImpl(false)
+assertEq(u.assembly, 15)
|