C#: Narrow the use of unbound declaration locations to nested types.

This commit is contained in:
Michael Nebel
2025-10-07 09:43:39 +02:00
parent 6149608c03
commit f9d62a0efc

View File

@@ -30,7 +30,7 @@ class Type extends Member, TypeContainer, @type {
/** Holds if this type is implicitly convertible to `that` type. */
predicate isImplicitlyConvertibleTo(Type that) { implicitConversion(this, that) }
override Location getALocation() { type_location(this.getUnboundDeclaration(), result) }
override Location getALocation() { type_location(this, result) }
override Type getChild(int n) { none() }
@@ -394,6 +394,8 @@ class NestedType extends ValueOrRefType {
NestedType() { nested_types(this, _, _) }
override ValueOrRefType getDeclaringType() { nested_types(this, result, _) }
override Location getALocation() { type_location(this.getUnboundDeclaration(), result) }
}
/**