485.35. Where at any time in a taxation year a person surrenders a particular capital property, other than a distress preferred share, that is a share, an interest in a partnership or a capital interest in a trust, the person is deemed to have a capital gain from the disposition at that time of another capital property or, where the particular capital property is a taxable Canadian property, another taxable Canadian property, equal to the amount by which the aggregate of all amounts deducted under paragraph b.1 of section 257 in computing the adjusted cost base to the person of the particular capital property immediately before that time exceeds the aggregate of(a) the amount that would, but for section 638, be the person’s capital gain for the year from the disposition of the particular capital property; and
(b) where, at the end of the year, the person is resident in Canada or is a person not resident in Canada who carries on business in Canada through a fixed place of business, the amount designated under section 485.40 by the person in respect of the disposition, at that time or immediately after that time, of the particular capital property.