C#: Change Property TagStackBehaviour to push a tag, to give the expression body a tag stack.

This commit is contained in:
calum
2018-11-15 18:25:48 +00:00
parent bb49fe170b
commit 090e896ff5
3 changed files with 12 additions and 1 deletions

View File

@@ -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;
}
}

View File

@@ -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

View File

@@ -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 |