Skip to content
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.

Commit

Permalink
Add test case for issue 2151
Browse files Browse the repository at this point in the history
  • Loading branch information
Herman Venter committed Aug 10, 2018
1 parent 47368f3 commit d8b3a70
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions test/serializer/optimized-functions/Issue2151.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
function bad(v) {
if (v == null) {
return null;
}
var a = v.a,
b = v.b;
if (a == null || b == null) {
return a && b;
}
return v;
}

if (global.__optimize) __optimize(bad);

inspect = function() {
return bad(null);
};

0 comments on commit d8b3a70

Please sign in to comment.