mirror of
https://github.com/github/codeql.git
synced 2026-04-27 01:35:13 +02:00
C#: Add some examples of uses of the Experimental attribute and update the expected test output.
This commit is contained in:
@@ -106,6 +106,8 @@ arguments
|
||||
| attributes.cs:151:6:151:11 | [Params(...)] | 0 | attributes.cs:151:45:151:47 | "a" |
|
||||
| attributes.cs:151:6:151:11 | [Params(...)] | 1 | attributes.cs:151:36:151:38 | "b" |
|
||||
| attributes.cs:151:6:151:11 | [Params(...)] | 2 | attributes.cs:151:19:151:29 | array creation of type Int32[] |
|
||||
| attributes.cs:155:2:155:13 | [Experimental(...)] | 0 | attributes.cs:155:15:155:35 | "MyExperimentalClass" |
|
||||
| attributes.cs:158:6:158:17 | [Experimental(...)] | 0 | attributes.cs:158:19:158:40 | "MyExperimentalMethod" |
|
||||
constructorArguments
|
||||
| Assembly1.dll:0:0:0:0 | [Custom(...)] | 0 | Assembly1.dll:0:0:0:0 | 1 |
|
||||
| Assembly1.dll:0:0:0:0 | [Custom(...)] | 0 | Assembly1.dll:0:0:0:0 | 3 |
|
||||
@@ -202,6 +204,8 @@ constructorArguments
|
||||
| attributes.cs:151:6:151:11 | [Params(...)] | 0 | attributes.cs:151:45:151:47 | "a" |
|
||||
| attributes.cs:151:6:151:11 | [Params(...)] | 1 | attributes.cs:151:36:151:38 | "b" |
|
||||
| attributes.cs:151:6:151:11 | [Params(...)] | 2 | attributes.cs:151:19:151:29 | array creation of type Int32[] |
|
||||
| attributes.cs:155:2:155:13 | [Experimental(...)] | 0 | attributes.cs:155:15:155:35 | "MyExperimentalClass" |
|
||||
| attributes.cs:158:6:158:17 | [Experimental(...)] | 0 | attributes.cs:158:19:158:40 | "MyExperimentalMethod" |
|
||||
namedArguments
|
||||
| Assembly1.dll:0:0:0:0 | [Custom(...)] | Prop2 | Assembly1.dll:0:0:0:0 | array creation of type Object[] |
|
||||
| Assembly1.dll:0:0:0:0 | [Custom(...)] | Prop2 | Assembly1.dll:0:0:0:0 | array creation of type Object[] |
|
||||
|
||||
@@ -36,6 +36,8 @@
|
||||
| attributes.cs:146:17:146:18 | M2 | attributes.cs:145:6:145:11 | [Params(...)] | Class1+ParamsAttribute |
|
||||
| attributes.cs:149:17:149:18 | M3 | attributes.cs:148:6:148:11 | [Params(...)] | Class1+ParamsAttribute |
|
||||
| attributes.cs:152:17:152:18 | M4 | attributes.cs:151:6:151:11 | [Params(...)] | Class1+ParamsAttribute |
|
||||
| attributes.cs:156:14:156:32 | MyExperimentalClass | attributes.cs:155:2:155:13 | [Experimental(...)] | System.Diagnostics.CodeAnalysis.ExperimentalAttribute |
|
||||
| attributes.cs:159:17:159:36 | MyExperimentalMethod | attributes.cs:158:6:158:17 | [Experimental(...)] | System.Diagnostics.CodeAnalysis.ExperimentalAttribute |
|
||||
| attributes.dll:0:0:0:0 | attributes, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null | attributes.cs:11:12:11:24 | [assembly: AssemblyTitle(...)] | System.Reflection.AssemblyTitleAttribute |
|
||||
| attributes.dll:0:0:0:0 | attributes, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null | attributes.cs:12:12:12:30 | [assembly: AssemblyDescription(...)] | System.Reflection.AssemblyDescriptionAttribute |
|
||||
| attributes.dll:0:0:0:0 | attributes, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null | attributes.cs:13:12:13:32 | [assembly: AssemblyConfiguration(...)] | System.Reflection.AssemblyConfigurationAttribute |
|
||||
|
||||
@@ -461,3 +461,15 @@ attributes.cs:
|
||||
# 151| -1: [ArrayInitializer] { ..., ... }
|
||||
# 151| 0: [IntLiteral] 1
|
||||
# 152| 4: [BlockStmt] {...}
|
||||
# 156| [Class] MyExperimentalClass
|
||||
#-----| 0: (Attributes)
|
||||
# 155| 1: [DefaultAttribute] [Experimental(...)]
|
||||
# 155| -1: [TypeMention] ExperimentalAttribute
|
||||
# 155| 0: [StringLiteralUtf16] "MyExperimentalClass"
|
||||
# 159| 5: [Method] MyExperimentalMethod
|
||||
# 159| -1: [TypeMention] Void
|
||||
#-----| 0: (Attributes)
|
||||
# 158| 1: [DefaultAttribute] [Experimental(...)]
|
||||
# 158| -1: [TypeMention] ExperimentalAttribute
|
||||
# 158| 0: [StringLiteralUtf16] "MyExperimentalMethod"
|
||||
# 159| 4: [BlockStmt] {...}
|
||||
|
||||
@@ -152,3 +152,9 @@ class Class1
|
||||
public void M4() { }
|
||||
}
|
||||
|
||||
[Experimental("MyExperimentalClass")]
|
||||
public class MyExperimentalClass
|
||||
{
|
||||
[Experimental("MyExperimentalMethod")]
|
||||
public void MyExperimentalMethod() { }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user