Subject: [netmod] Clarification on deviating type resolve scope?

From: "Peter Lundell (plundell)" <[email-masked]>
Date: Fri, 19 Feb 2021 13:49:41 +0000

Hi all.

I'm working with an issue involving a deviate replace type and the problem is
where the type should be resolved.

The scope in which the deviated property is resolved in is not explicitly
stated in RFC 7950 (7.20.3.2). This would have impact when replacing the type,
both when it's prefixed and when it's not.
It does seem logical, and also in line with the rest of the RFC, to evaluate the
replaced property in deviating module scope and not target module scope.
Can deviating module scope be assumed?
Should the RFC be clarified and the scope explicitly stated?

BR
/Peter Lundell

---

From: Martin Björklund <[email-masked]>
Date: Fri, 19 Feb 2021 15:45:29 +0100 (CET)

Hi Peter,

[Kul att se dig här!]

> replaced property in deviating module scope and not target module scope.

Section 5.1 says:

   Statements in the module or submodule can
   reference definitions in the external module using the prefix
   specified in the "import" statement.

   [...]

   When a definition in an external module is referenced, a locally
   defined prefix MUST be used, followed by a colon (":") and then the
   external identifier.  References to definitions in the local module
   MAY use the prefix notation.

This is a general rule, and it is not repeated in every place where
it applies.  So it applies to this case as well.

/martin