mirror of
https://github.com/github/codeql.git
synced 2026-04-30 11:15:13 +02:00
Merge pull request #9806 from igfoo/igfoo/useType
Kotlin: Extract an ErrorType if we fail to correctly extract a type
This commit is contained in:
@@ -47,6 +47,8 @@ predicate hasName(Element e, string name) {
|
||||
kt_type_alias(e, name, _)
|
||||
or
|
||||
ktProperties(e, name)
|
||||
or
|
||||
e instanceof ErrorType and name = "<CodeQL error type>"
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -666,6 +666,14 @@ class RefType extends Type, Annotatable, Modifiable, @reftype {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* An `ErrorType` is generated when CodeQL is unable to correctly
|
||||
* extract a type.
|
||||
*/
|
||||
class ErrorType extends RefType, @errortype {
|
||||
override string getAPrimaryQlClass() { result = "ErrorType" }
|
||||
}
|
||||
|
||||
/** A type that is the same as its source declaration. */
|
||||
class SrcRefType extends RefType {
|
||||
SrcRefType() { this.isSourceDeclaration() }
|
||||
|
||||
Reference in New Issue
Block a user