Skip to content

Commit fc81f3c

Browse files
committed
C#: Deprecate UnboundGenericType::getInstanceType/0
1 parent c6bc1a3 commit fc81f3c

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

csharp/ql/lib/semmle/code/csharp/Generics.qll

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ class UnboundGenericType extends ValueOrRefType, UnboundGeneric {
127127
* is a constructed type created from the unbound type, with each of the supplied type
128128
* arguments being the corresponding type parameter.
129129
*/
130-
ConstructedType getInstanceType() {
130+
deprecated ConstructedType getInstanceType() {
131131
result = this.getAConstructedGeneric() and
132132
forall(TypeParameter tp, int i | tp = this.getTypeParameter(i) | tp = result.getTypeArgument(i))
133133
}
@@ -277,7 +277,7 @@ class TypeParameterConstraints extends Element, @type_parameter_constraints {
277277
* ```
278278
*/
279279
class UnboundGenericStruct extends Struct, UnboundGenericType {
280-
override ConstructedStruct getInstanceType() {
280+
deprecated override ConstructedStruct getInstanceType() {
281281
result = UnboundGenericType.super.getInstanceType()
282282
}
283283

@@ -300,7 +300,7 @@ class UnboundGenericStruct extends Struct, UnboundGenericType {
300300
* ```
301301
*/
302302
class UnboundGenericClass extends Class, UnboundGenericType {
303-
override ConstructedClass getInstanceType() {
303+
deprecated override ConstructedClass getInstanceType() {
304304
result = UnboundGenericType.super.getInstanceType()
305305
}
306306

@@ -323,7 +323,7 @@ class UnboundGenericClass extends Class, UnboundGenericType {
323323
* ```
324324
*/
325325
class UnboundGenericInterface extends Interface, UnboundGenericType {
326-
override ConstructedInterface getInstanceType() {
326+
deprecated override ConstructedInterface getInstanceType() {
327327
result = UnboundGenericType.super.getInstanceType()
328328
}
329329

@@ -347,7 +347,7 @@ class UnboundGenericInterface extends Interface, UnboundGenericType {
347347
* ```
348348
*/
349349
class UnboundGenericDelegateType extends DelegateType, UnboundGenericType {
350-
override ConstructedDelegateType getInstanceType() {
350+
deprecated override ConstructedDelegateType getInstanceType() {
351351
result = UnboundGenericType.super.getInstanceType()
352352
}
353353

0 commit comments

Comments
 (0)