CodeQL library for Swift
codeql/swift-all 6.2.1-dev (changelog, source)
Search

Class Raw::OpenExistentialExpr

INTERNAL: Do not use. An implicit expression created by the compiler when a method is called on a protocol. For example in

protocol P {
  func foo() -> Int
}
func bar(x: P) -> Int {
  return x.foo()
}
`x.foo()` is actually wrapped in an `OpenExistentialExpr` that "opens" `x` replacing it in its subexpression with
an `OpaqueValueExpr`.

Import path

import codeql.swift.generated.Raw

Direct supertypes

Indirect supertypes

Predicates

getExistential

Gets the protocol-typed expression opened by this expression.

getOpaqueExpr

Gets the opaque value expression embedded within getSubExpr().

getSubExpr

Gets the sub expression of this open existential expression.

toString

Inherited predicates

getLocation

Gets the location associated with this element in the code, if it exists.

from Locatable
getType

Gets the type of this expression, if it exists.

from Expr
isUnknown

Holds if this element is unknown.

from Element