The case concerned Rectory Homes Limited's proposal to build 78 'extra care' homes on a 2.94 hectare site in Thame, Oxfordshire, which has a listed 19th Century building, known as 'the Elms', at its heart.
The site, made up of private parkland and mature trees, lies within the Thame Conservation Area.
Residents of the development would have the benefit of communal facilities, including a dining area, function room, treatment rooms and a gym.
Units could be occupied by up to two people, at least one of whom must be aged 65 and in need of at least two hours of personal care per week.
South Oxfordshire District Council refused planning consent for the scheme and Rectory Homes' appeal against that decision was rejected by a planning inspector in October last year.
The inspector found that the "less than substantial" harm that the development would cause to heritage assets was balanced by its public benefits.
However, he also noted that the scheme conflicted with the Thame Neighbourhood Plan, which states that a maximum of 45 dwellings should be built on the site.
The inspector's central conclusion, however, was that the failure to provide a sufficient number of affordable homes as part of the scheme would cause "very substantial harm".
Both the South Oxfordshire core strategy and the neighbourhood plan require, subject to viability considerations, that every development of three or more dwellings should provide 40 per cent affordable homes or that developers should make a financial contribution to enable such provision to be made off-site.
Challenging the inspector's decision, Rectory Homes pointed out that the council did not dispute that the development would fall into the category of "residential institution", as defined by Class C2 of the Schedule to the Town and Country Planning (Use Classes) Order 1987.
The company submitted that the development could not also fall within Class C3, which concerns 'dwellinghouses'.
On that basis, it argued that the proposed 78 residential units would not be "dwellings" and that the affordable housing policies therefore did not apply to the project.
Rupert Warren QC, for the company, asserted that Class C3 "exhaustively defines" what may be considered a "dwelling" and that a unit of residential accommodation which falls within Class C2 cannot, therefore, be a dwelling.
Rejecting that argument, however, Mr Justice Holgate observed that it is well established that the terms "dwelling" and "dwelling house" in planning legislation refer to "a unit of residential accommodation which provides the facilities for day-to-day private domestic existence."
He added: "This concept is consistent with the core strategy's interchangeable use of the words "Dwelling", "House", "Home" and "Unit".
It could include an extra-care dwelling, in the sense of a private home with the facilities needed for "independent living but where care is provided to someone in need of care", the judge said.
The scope of the core strategy's affordable housing policy was, the judge ruled, "not constrained by the interaction between the C2 and C3 Use Classes, nor is it restricted to development falling within Class C3."
"In summary, there is no reason why a C2 development or scheme may not provide residential accommodation in the form of dwellings.
"There is nothing in the plan to suggest, nor any reason to think, that the word 'dwelling', whether in the policy or elsewhere, is confined to residential accommodation the use of which falls wholly within the C3 Use Class."
All Rectory Homes' grounds of challenge to the inspector's decision were dismissed.
Rectory Homes Limited v Secretary of State for Housing, Communities and Local Government. Case Number: CO/4682/2019