Skip to content

Commit 0a0657a

Browse files
hvitvedtamasvajk
authored andcommitted
C#: Adapt to new Roslyn representation of implicit Main methods
1 parent 1c230d0 commit 0a0657a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

csharp/ql/lib/semmle/code/csharp/Stmt.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ class BlockStmt extends Stmt, @block_stmt {
7575

7676
/** Holds if this block is the container of the global statements. */
7777
predicate isGlobalStatementContainer() {
78-
this.getEnclosingCallable().hasQualifiedName("<Program>$.<Main>$")
78+
this.getEnclosingCallable().hasQualifiedName("Program.<Main>$")
7979
}
8080

8181
override Stmt stripSingletonBlocks() {

csharp/ql/lib/semmle/code/csharp/commons/Util.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class MainMethod extends Method {
88
(
99
this.hasName("Main")
1010
or
11-
this.hasQualifiedName("<Program>$", "<Main>$")
11+
this.hasQualifiedName("Program.<Main>$")
1212
) and
1313
this.isStatic() and
1414
(this.getReturnType() instanceof VoidType or this.getReturnType() instanceof IntType) and

0 commit comments

Comments
 (0)