Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add extension property to SemanticDB #2799

Open
tanishiking opened this issue Aug 1, 2022 · 1 comment
Open

Add extension property to SemanticDB #2799

tanishiking opened this issue Aug 1, 2022 · 1 comment

Comments

@tanishiking
Copy link
Member

Currently, we don't have a way to tell whether a method is an extension method or not.

Proposing adding a new property EXTENSION like this

enum Property {
UNKNOWN_PROPERTY = 0;
reserved 0x1;
reserved 0x2;
ABSTRACT = 0x4;
FINAL = 0x8;
SEALED = 0x10;
IMPLICIT = 0x20;
LAZY = 0x40;
CASE = 0x80;
COVARIANT = 0x100;
CONTRAVARIANT = 0x200;
VAL = 0x400;
VAR = 0x800;
STATIC = 0x1000;
PRIMARY = 0x2000;
ENUM = 0x4000;
DEFAULT = 0x8000;
GIVEN = 0x10000;
INLINE = 0x20000;
OPEN = 0x40000;
TRANSPARENT = 0x80000;
INFIX = 0x100000;
OPAQUE = 0x200000;
}

     TRANSPARENT = 0x80000;
     INFIX = 0x100000;
     OPAQUE = 0x200000;
+    EXTENSION = 0x400000;

when we have

extension (num: Int)
  def foo = ???

The SymbolInformation for foo will have an EXTENSION property, and kind = METHOD.

@kitbellew
Copy link
Contributor

@tanishiking it looks like a good idea. are you looking for an opinion from others (i doubt you need help with implementation 🙂)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants