Add regression test

This commit is contained in:
Anders Hejlsberg committed 2016-06-15 09:28:45 -07:00
1 parent 6366a6d6a3
commit 28b241e615
1 file changed
+15
@@ -0,0 +1,15 @@
// @strictNullChecks: true
// Repro from #9113
let sinOrCos = Math.random() < .5;
let choice = sinOrCos && Math.sin || Math.cos;
choice(Math.PI);
function sq(n?: number): number {
const r = n !== undefined && n*n || 0;
return r;
}
sq(3);