Skip to content

Commit

Permalink
Âdd tests for variable named scoped.
Browse files Browse the repository at this point in the history
  • Loading branch information
martin-strecker-sonarsource committed Sep 25, 2023
1 parent efc3240 commit 8834896
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1293,6 +1293,7 @@ public void M(object o)
[DataRow("ref [t:S] s2 = ref s1;", false)]
[DataRow("scoped [t:S] s2 = s1;", false)]
[DataRow("[k:scoped] [k:ref] [k:readonly] [t:S] [u:s2] = [k:ref] [u:s1];", false)]
[DataRow("[k:int] [u:scoped] = 1;", false)]
public void IdentifierToken_Scoped_Local(string localDeclaration, bool allowSemanticModel) =>
ClassifierTestHarness.AssertTokenTypes($$"""
using System;
Expand All @@ -1314,6 +1315,7 @@ public void M(ref S s1)
[DataRow("ref [t:S] s", false)]
[DataRow("scoped [t:S] s", false)]
[DataRow("[k:scoped] [k:ref] [t:S] [u:s]", false)]
[DataRow("[k:int] [u:scoped]", false)]
public void IdentifierToken_Scoped_Parameter(string parameterDeclaration, bool allowSemanticModel) =>
ClassifierTestHarness.AssertTokenTypes($$"""
using System;
Expand Down

0 comments on commit 8834896

Please sign in to comment.