BallerinaMethodSymbol and BallerinaSymbol #29778
-
Is there any reason why we don't inherit Ref: The reference issues for this are: #28388 #29467 This happens in the The code snippet: private BSymbol getInternalSymbol(Symbol symbol) {
if (symbol.kind() == TYPE) {
return ((AbstractTypeSymbol) symbol).getBType().tsymbol;
}
return ((BallerinaSymbol) symbol).getInternalSymbol();
} Here, the error comes because @pubudu91 any thoughts? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Didn't extend from |
Beta Was this translation helpful? Give feedback.
Didn't extend from
BallerinaSymbol
at that time because there wasn't any particular reason to do so. The method symbol is basically a wrapper around a function symbol. We just simply call the function symbol's methods for each of the methods. This is for that NPE issue when looking up references of methods in classes right? No harm in extending fromBallerinaSymbol
. Since these are internal implementation details, we can change these as we see fit.