File tree Expand file tree Collapse file tree 3 files changed +10
-1
lines changed
ql/test/library-tests/csharp9 Expand file tree Collapse file tree 3 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -112,6 +112,13 @@ public override void Populate(TextWriter trapFile)
112
112
foreach ( var l in symbol . Locations )
113
113
trapFile . param_location ( this , Context . CreateLocation ( l ) ) ;
114
114
115
+ if ( ! symbol . Locations . Any ( ) &&
116
+ symbol . ContainingSymbol is IMethodSymbol ms &&
117
+ ms . Name == WellKnownMemberNames . TopLevelStatementsEntryPointMethodName )
118
+ {
119
+ trapFile . param_location ( this , Context . CreateLocation ( ) ) ;
120
+ }
121
+
115
122
if ( ! IsSourceDeclaration || ! symbol . FromSource ( ) )
116
123
return ;
117
124
Original file line number Diff line number Diff line change @@ -392,6 +392,8 @@ FunctionPointer.cs:
392
392
GlobalStmt.cs:
393
393
# 7| [Class] <Program>$
394
394
# 7| 4: [Method] <Main>$
395
+ #-----| 2: (Parameters)
396
+ # 1| 0: [Parameter] args
395
397
# 7| 4: [BlockStmt] {...}
396
398
# 11| 0: [ExprStmt] ...;
397
399
# 11| 0: [MethodCall] call to method WriteLine
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ global_stmt
4
4
| GlobalStmt.cs:13:1:13:4 | ...; |
5
5
| GlobalStmt.cs:15:1:17:1 | M(...) |
6
6
globalBlock
7
- | GlobalStmt.cs:7:1:25:1 | {...} | GlobalStmt.cs:7:1:25:1 | <Main>$ | file://:0:0:0 :0 | args | GlobalStmt.cs:7:1:25:1 | <Program>$ |
7
+ | GlobalStmt.cs:7:1:25:1 | {...} | GlobalStmt.cs:7:1:25:1 | <Main>$ | GlobalStmt.cs:1:1:1 :0 | args | GlobalStmt.cs:7:1:25:1 | <Program>$ |
8
8
methods
9
9
| GlobalStmt.cs:7:1:25:1 | <Main>$ | entry |
10
10
| GlobalStmt.cs:21:8:21:9 | M1 | non-entry |
You can’t perform that action at this time.
0 commit comments