Community
Participate
Working Groups
Input file: class X { def method() { val CharSequence c = null c.toString // first expectString(c.toString) // second if (true) { expectString(c.toString) // third } } def expectString(String s) {} } Invoke CA in annotated lines right after c.toString First example works as expected Second yields 'Override Object.toString()' which is not right Third offers Object.toString() in addition to CharSequence.toString which is not what one would expect (assumed receiver seems to be 'this' since X.toString is suggested if toString is specialized in X
For the second scenario there is a context computed where the currentModel is a XtendClass - that causes the override stuff. org.eclipse.xtext.ui.editor.contentassist.antlr.ParserBasedContentAssistContextFactory.StatefulFactory.computeCurrentModel(EObject, INode, Collection<AbstractElement>)
Pushed to review