Swift: fix MethodLookupExpr.getMethod()

By adding a couple missing cases.
This commit is contained in:
Nora Dimitrijević
2022-12-08 18:06:45 -05:00
parent c1e746a980
commit 89bfad0420

View File

@@ -14,7 +14,16 @@ class MethodLookupExpr extends Generated::MethodLookupExpr {
override Decl getImmediateMember() {
result =
Synth::convertDeclFromRaw(this.getUnderlying().getFunction().(Raw::DeclRefExpr).getDecl()) // TODO: FIX THIS
Synth::convertDeclFromRaw([
this.getUnderlying().getFunction().(Raw::DeclRefExpr).getDecl(),
this.getUnderlying()
.getFunction()
.(Raw::FunctionConversionExpr)
.getSubExpr()
.(Raw::DeclRefExpr)
.getDecl(),
this.getUnderlying().getFunction().(Raw::OtherConstructorDeclRefExpr).getConstructorDecl()
])
}
MethodDecl getMethod() { result = this.getMember() }