Swift: init/deinit stringifies with qualifier

This commit is contained in:
Nora Dimitrijević
2022-12-08 18:02:23 -05:00
parent 14b84c6e06
commit 2af8ec86e6
2 changed files with 6 additions and 2 deletions

View File

@@ -4,4 +4,6 @@ private import codeql.swift.elements.decl.MethodDecl
/**
* An initializer of a class, struct, enum or protocol.
*/
class ConstructorDecl extends Generated::ConstructorDecl, MethodDecl { }
class ConstructorDecl extends Generated::ConstructorDecl, MethodDecl {
override string toString() { result = this.getSelfParam().getType() + "." + super.toString() }
}

View File

@@ -4,4 +4,6 @@ private import codeql.swift.elements.decl.MethodDecl
/**
* A deinitializer of a class.
*/
class DestructorDecl extends Generated::DestructorDecl, MethodDecl { }
class DestructorDecl extends Generated::DestructorDecl, MethodDecl {
override string toString() { result = this.getSelfParam().getType() + "." + super.toString() }
}