From e10618fa61efeed1c5f594ec5e90556af596538f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Strehovsk=C3=BD?= Date: Wed, 14 Jun 2023 09:21:16 +0900 Subject: [PATCH 1/3] Testing CI --- src/coreclr/tools/Common/TypeSystem/Common/SignatureVariable.cs | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/coreclr/tools/Common/TypeSystem/Common/SignatureVariable.cs b/src/coreclr/tools/Common/TypeSystem/Common/SignatureVariable.cs index b3184284f675bd..4a26cb619d57bc 100644 --- a/src/coreclr/tools/Common/TypeSystem/Common/SignatureVariable.cs +++ b/src/coreclr/tools/Common/TypeSystem/Common/SignatureVariable.cs @@ -66,8 +66,6 @@ protected override TypeFlags ComputeTypeFlags(TypeFlags mask) flags |= TypeFlags.SignatureTypeVariable; } - flags |= TypeFlags.AttributeCacheComputed; - return flags; } From bf857dab8566b92d40d76e9789b0a90a125ee54f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Strehovsk=C3=BD?= Date: Thu, 13 Jul 2023 15:42:55 +0900 Subject: [PATCH 2/3] Comment --- .../Common/TypeSystem/Common/SignatureVariable.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/coreclr/tools/Common/TypeSystem/Common/SignatureVariable.cs b/src/coreclr/tools/Common/TypeSystem/Common/SignatureVariable.cs index 4a26cb619d57bc..bdff1c4303503c 100644 --- a/src/coreclr/tools/Common/TypeSystem/Common/SignatureVariable.cs +++ b/src/coreclr/tools/Common/TypeSystem/Common/SignatureVariable.cs @@ -103,6 +103,17 @@ protected override TypeFlags ComputeTypeFlags(TypeFlags mask) flags |= TypeFlags.SignatureMethodVariable; } + // ****************************************************** + // Do not add other flags here. If you're hitting asserts + // because a flag wasn't set, this is a bug in the + // calling code. The fix is not here. + // + // The calling code is asking questions that are not + // possible to answer for signature variables + // (like: is this ByRef-like? We won't know until + // a substitution happens. Any answer would be wrong.) + // ****************************************************** + return flags; } From bd9be74de2c6543d677dcb8f6f01807e4bba60a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Strehovsk=C3=BD?= Date: Thu, 13 Jul 2023 15:49:06 +0900 Subject: [PATCH 3/3] Update SignatureVariable.cs --- .../Common/TypeSystem/Common/SignatureVariable.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/coreclr/tools/Common/TypeSystem/Common/SignatureVariable.cs b/src/coreclr/tools/Common/TypeSystem/Common/SignatureVariable.cs index bdff1c4303503c..82d4ca3555d084 100644 --- a/src/coreclr/tools/Common/TypeSystem/Common/SignatureVariable.cs +++ b/src/coreclr/tools/Common/TypeSystem/Common/SignatureVariable.cs @@ -66,6 +66,17 @@ protected override TypeFlags ComputeTypeFlags(TypeFlags mask) flags |= TypeFlags.SignatureTypeVariable; } + // ****************************************************** + // Do not add other flags here. If you're hitting asserts + // because a flag wasn't set, this is a bug in the + // calling code. The fix is not here. + // + // The calling code is asking questions that are not + // possible to answer for signature variables + // (like: is this ByRef-like? We won't know until + // a substitution happens. Any answer would be wrong.) + // ****************************************************** + return flags; }