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)
112112 foreach ( var l in symbol . Locations )
113113 trapFile . param_location ( this , Context . CreateLocation ( l ) ) ;
114114
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+
115122 if ( ! IsSourceDeclaration || ! symbol . FromSource ( ) )
116123 return ;
117124
Original file line number Diff line number Diff line change @@ -392,6 +392,8 @@ FunctionPointer.cs:
392392GlobalStmt.cs:
393393# 7| [Class] <Program>$
394394# 7| 4: [Method] <Main>$
395+ #-----| 2: (Parameters)
396+ # 1| 0: [Parameter] args
395397# 7| 4: [BlockStmt] {...}
396398# 11| 0: [ExprStmt] ...;
397399# 11| 0: [MethodCall] call to method WriteLine
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ global_stmt
44| GlobalStmt.cs:13:1:13:4 | ...; |
55| GlobalStmt.cs:15:1:17:1 | M(...) |
66globalBlock
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>$ |
88methods
99| GlobalStmt.cs:7:1:25:1 | <Main>$ | entry |
1010| GlobalStmt.cs:21:8:21:9 | M1 | non-entry |
You can’t perform that action at this time.
0 commit comments