-
Notifications
You must be signed in to change notification settings - Fork 418
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
Intellisense not showing methods from the Base class in Signature Help #1030
Changes from 5 commits
30c5092
de3de6a
ef0352a
eff068d
cf8f790
6362fda
997d104
41d4d2c
2c0bc6f
9cb58b4
07cee28
29b3803
2e1e0a0
cda2c28
a13a6b0
17f52cf
fbc4c5f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -474,13 +474,69 @@ public Program(Program p, int n) | |
{ | ||
} | ||
}"; | ||
|
||
var actual = await GetSignatureHelp(source); | ||
Assert.Equal(3, actual.Signatures.Count()); | ||
Assert.Equal(1, actual.ActiveParameter); | ||
Assert.Contains("ctor2", actual.Signatures.ElementAt(actual.ActiveSignature).Documentation); | ||
} | ||
|
||
[Fact] | ||
public async Task SignatureHelpForOverloadedMethodsInheritance() | ||
{ | ||
const string source = | ||
@"public class MyBase | ||
{ | ||
public void MyMethod(int a) { } | ||
public void MyMethod(int a, int b) { } | ||
} | ||
|
||
public class Class1 : MyBase | ||
{ | ||
public void MyMethod(int a, int b, int c) { } | ||
public void MyMethod(int a, int b, int c, int d) { } | ||
} | ||
|
||
public class Class2 | ||
{ | ||
public void foo() | ||
{ | ||
Class1 c1 = new Class1(); | ||
c1.MyMethod($$); | ||
} | ||
|
||
}"; | ||
var actual = await GetSignatureHelp(source); | ||
Assert.Equal(4, actual.Signatures.Count()); | ||
} | ||
|
||
[Fact] | ||
public async Task SignatureHelpForOverloadedInaccesibleMethods() | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you also add a test to verify behavior if there's an extension method with the same name? |
||
{ | ||
const string source = | ||
@"public class MyBase | ||
{ | ||
private void MyMethod(int a) { } | ||
} | ||
|
||
public class Class1 : MyBase | ||
{ | ||
public void MyMethod(int a, int b, int c) { } | ||
protected void MyMethod(int a, int b, int c, int d) { } | ||
} | ||
|
||
public class Class2 | ||
{ | ||
public void foo() | ||
{ | ||
Class1 c1 = new Class1(); | ||
c1.MyMethod($$); | ||
} | ||
|
||
}"; | ||
var actual = await GetSignatureHelp(source); | ||
Assert.Single(actual.Signatures); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should we verify which signature we got? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes we should.Added that. |
||
} | ||
|
||
[Fact] | ||
public async Task SkipReceiverOfExtensionMethods() | ||
{ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a case for methods with the same name that shouldn't be accessible? Eg: