It sounds like your basement rental may be a situation where there is no deemed disposition.
A principal residence generally includes a house, condo, cottage, trailer or similar housing unit that you own alone or jointly with another person or people. You, your current or former spouse or common-law partner, or one of your children must have ordinarily inhabited the property during the year to qualify.
Interestingly, if you rent your entire home to your child, it may continue to qualify as your principal residence even though the income-producing use is more than just ancillary.
Also, the ordinarily inhabited rule does not require continuous use of the property, and that is what can allow a seasonal cottage to qualify for exemption.
Assuming you did not claim any capital cost allowance on your tax return when you reported your rental income, and either you or one of your son were living in the home in each year you owned it, the property may qualify as your principal residence for all years it was owned so that the eventual sale proceeds would be tax-free. This assumes you did not claim a principal residence exemption for any other real estate you sold for any of those years of ownership.
You can claim the principal residence exemption on your tax return when the property is sold by reporting the sale and designating the property as your principal residence on Schedule 3 of your tax return. You also must complete Form T2091 (or Form 1255 to designate a property as a principal residence for a deceased taxpayer).
It is important to note that while a parent can claim a home that is inhabited by their child as their principal residence, it does not work the other way around. In other words, a property owned by a taxpayer that is inhabited by a parent will not qualify as that taxpayer’s principal residence.
The principal residence exemption rules can be complicated in situations where some or all of a property is used for business or rental purposes, but under some exemptions or by filing elections, the tax-free status may be maintained.