Open iteemhe opened 2 years ago
False positive has been fixed. Convert to a pull request
Your fix is I think the best way to handle this given that the Declarator
itself doesn't carry any information about the presence of that const other than in the recieverType
, which will be undefined if it's not a member function.
But, I think the best approach would be to fix the underlying issues/bugs (which are obviously not your fault!):
In FunctionDefinition.ts
there's some relevant code:
Here, in the case of an out-of-line definition, the declarator that's created actually comes out with a type
is a function type with an undefined receiverType
. We'd need to either fix this somehow by comparing to the linked entity it's matched against, or I suppose ensure the proper class context was originally provided to the declarator somehow. Perhaps the Declarator
class could actually preprocess the qualified name to determine that?
I'm not sure - this issue goes a bit deeper. Lobster unfortunately wasn't built with qualified names in mind and the support is a little bit shaky.
I'll need to think about this a bit more...
… and if it is a member function
296