mirror of
https://github.com/github/codeql.git
synced 2026-04-26 09:15:12 +02:00
Kotlin: Fix File locations, and fromSource/hasSourceLocation for Kotlin code
This commit is contained in:
@@ -34,7 +34,7 @@ class Element extends @element, Top {
|
||||
* Elements pertaining to source files may include generated elements
|
||||
* not visible in source code, such as implicit default constructors.
|
||||
*/
|
||||
predicate fromSource() { this.getCompilationUnit().getExtension() = "java" }
|
||||
predicate fromSource() { this.getCompilationUnit().getExtension() = ["java", "kt"] }
|
||||
|
||||
/** Gets the compilation unit that this element belongs to. */
|
||||
CompilationUnit getCompilationUnit() { result = this.getFile() }
|
||||
|
||||
Reference in New Issue
Block a user