test(templates): Add one more (unfortunate) test case
This commit is contained in:
parent
5dab7d64e7
commit
01658b13c2
@ -129,9 +129,12 @@ describe('A custom instance', () => {
|
|||||||
assert.strictEqual(
|
assert.strictEqual(
|
||||||
inst.typeMerge(3, inst.complex(4.5,2.1)),
|
inst.typeMerge(3, inst.complex(4.5,2.1)),
|
||||||
'Merge to Complex')
|
'Merge to Complex')
|
||||||
// The following is the current behavior, since both `3+0i` and `3n + 0ni`
|
// The following is the current behavior, since 3 converts to 3+0i
|
||||||
// are Complex, but it is unfortunate and hopefully it will be fixed
|
// and 3n converts to 3n+0ni, both of which are technically Complex.
|
||||||
// with templates:
|
// This will remain the case even with templated Complex, because
|
||||||
|
// both Complex<bigint> and Complex<NumInt> will refine Complex (for the
|
||||||
|
// sake of catching new specializations). Not sure whether that will be
|
||||||
|
// OK or a problem that will have to be dealt with.
|
||||||
assert.strictEqual(inst.typeMerge(3, 3n), 'Merge to Complex')
|
assert.strictEqual(inst.typeMerge(3, 3n), 'Merge to Complex')
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user