Skip to content

Latest commit

 

History

History
33 lines (25 loc) · 773 Bytes

fix-namespace-in-blockless-2024-6-30-10-31-17.md

File metadata and controls

33 lines (25 loc) · 773 Bytes
changeKind packages
breaking
@typespec/compiler

Fix issue where naming a namespace with the same name as the blockless namespace would merge with it instead of creating a subnamespace like any other name would.

namespace MyOrg.MyProject;

namespace MyOrg.MyProject.MyArea {
  model A {}
}

namespace MyArea2 {
  model B {}
}

Previously model A would end-up in namespace MyOrg.MyProject.MyArea and model B in MyOrg.MyProject.MyArea2. With this change model A will now be in MyOrg.MyProject.MyOrg.MyProject.MyArea. To achieve the previous behavior the above code should be written as:

namespace MyOrg.MyProject;

namespace MyArea {
  model A {}
}

namespace MyArea2 {
  model B {}
}