This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | CC shows wrong leftShift return type in tests | ||
---|---|---|---|
Product: | groovy | Reporter: | Martin Janicek <mjanicek> |
Component: | Editor | Assignee: | Martin Janicek <mjanicek> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | pjiricka |
Priority: | P3 | ||
Version: | 7.0.1 | ||
Hardware: | PC | ||
OS: | Windows 7 | ||
Issue Type: | DEFECT | Exception Reporter: |
Description
Martin Janicek
2011-12-05 15:48:25 UTC
Uncomment also those two tests together with fix: OperatorsCompletionTest.testSafeNavigation4 OperatorsCompletionTest.testMethodClosure4 Seems like the problem occurs only in tests where the IDE shows unexpected token error. For example test containing: "".&^ seems to be invalid for parser, but similar: "".&a^ seems to be valid. (the parser behavior looks fine to me - dynamic method are valid if there is some method name, otherwise the file cannot be compiled) *** This bug has been marked as a duplicate of bug 206610 *** Reopening, setting TM = Dev. At the end this and the issue 206610 are probably separate problems caused by insufficient sanitization. It's still hard to say why it results in randomly shown code completion, but at least it could be possibly fixed. MetaElementHandler.getMethods() is the problem! Obviously GroovySystem.getMetaClassRegistry().getMetaClass(clz) does not guarantees the order of loaded meta methods and thus sometimes String's methods commes before CharSequence ones and sometimes not. After so MetaElementHandler.addOrReplaceItem() checks for superClass (meaning java.lang.Object) distance which is lower for String methods and as a result they are replaced by CharSequence ones (e.g. returning StringBuilder instead of StringBuffer in leftShift method).. Altough not sure yet how to fix it correcly.. Fixed in: web-main #2c06023f31ec Integrated into 'main-golden', will be available in build *201303222300* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/2c06023f31ec User: Martin Janicek <mjanicek@netbeans.org> Log: #205951 - CC shows wrong leftShift return type in tests |