Skip to content

Commit 56a902a

Browse files
reid-spencerclaude
andcommitted
Remove field overloading warnings from validation
Fields are fully scoped by their containing record type, so same-named fields in different records within the same context are never ambiguous. Overloading checks remain for types, states, enumerators, domains, contexts, and other definitions. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 107909e commit 56a902a

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

passes/shared/src/main/scala/com/ossuminc/riddl/passes/validate/BasicValidation.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -201,10 +201,10 @@ trait BasicValidation(using pc: PlatformContext) {
201201
else if map.size == 1 then
202202
map.head._1 match {
203203
case name: String if name == Field.getClass.getSimpleName =>
204-
val fields = map.head._2.asInstanceOf[Seq[Field]]
205-
val types = fields.map(field => errorDescription(field.typeEx))
206-
val locations = fields.map(_.loc.format)
207-
reportNonDistinctTypes(types, locations, defList)
204+
// Fields are fully scoped by their containing type,
205+
// so same-named fields in different records within
206+
// the same context are never ambiguous
207+
()
208208
case name: String if name == Type.getClass.getSimpleName =>
209209
val typeDefs = map.head._2.asInstanceOf[Seq[Type]]
210210
val types = typeDefs.map(type_ => errorDescription(type_.typEx))

0 commit comments

Comments
 (0)