mirror of
https://github.com/github/codeql.git
synced 2026-04-30 19:26:02 +02:00
C#: Change Property TagStackBehaviour to push a tag, to give the expression body a tag stack.
This commit is contained in:
@@ -114,6 +114,6 @@ namespace Semmle.Extraction.CSharp.Entities
|
||||
public Property Create(Context cx, IPropertySymbol init) => new Property(cx, init);
|
||||
}
|
||||
|
||||
public override TrapStackBehaviour TrapStackBehaviour => TrapStackBehaviour.NoLabel;
|
||||
public override TrapStackBehaviour TrapStackBehaviour => TrapStackBehaviour.PushesLabel;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -131,6 +131,12 @@ class DynamicType
|
||||
class LocalVariableTags
|
||||
{
|
||||
Func<int, int> F = x => { int y=x; return y; };
|
||||
|
||||
private static Func<object, string, object> _getter => (o, n) =>
|
||||
{
|
||||
object x = o;
|
||||
return x;
|
||||
};
|
||||
}
|
||||
|
||||
// semmle-extractor-options: /r:System.Dynamic.Runtime.dll
|
||||
|
||||
@@ -59,3 +59,8 @@
|
||||
| Program.cs:133:10:133:12 | Int32 |
|
||||
| Program.cs:133:15:133:17 | Int32 |
|
||||
| Program.cs:133:31:133:33 | Int32 |
|
||||
| Program.cs:135:20:135:23 | Func<Object,String,Object> |
|
||||
| Program.cs:135:25:135:30 | Object |
|
||||
| Program.cs:135:33:135:38 | String |
|
||||
| Program.cs:135:41:135:46 | Object |
|
||||
| Program.cs:137:10:137:15 | Object |
|
||||
|
||||
Reference in New Issue
Block a user