Commit Graph

7 Commits

Author SHA1 Message Date
Dmitry Savvinov bd9254597d Fix testdata after switching idea version to 182
The source of testdata change is following commit from the
intellij-community repo:

d2bfe3d14bfa48af585f1faddc9a0c37dc05e724

It changes how Java-resolution resolves constructors:
- before, *any* PsiMethod without type reference was treated as
constructor
- now, PsiMethod without type reference is treated as constructor
only if their *names also match*

In particular, in this test, 'void () {}', surprisingly, doesn't have a
type reference ('void' is parsed as PsiErrorElement:Identifier
expected), its name is '<unnamed>', and its visibility is
'package-private' (!)

Therefore, previously we thought that 'Nameless' has package-private
constructor and were reporting INVISIBLE_MEMBER.
Now we don't see any constructor so we add default constructor, which has
public-visibility -> error is gone.

Note that this change affects behavior only when "red" code is already
present in the project (for "green" code, assumption "method without type
reference is a constructor" is indeed correct).
2018-08-07 10:18:25 +03:00
baratynskiy 01883a41cb javac-wrapper: refactoring, fixes and tests 2017-08-29 18:01:36 +03:00
Stanislav Erokhin 560c32c0f1 Added diagnostic error when in function declaration name was omitted 2015-03-12 17:11:44 +03:00
Zalim Bashorov 040d1693e8 Minor: revert semicolons after package declaration for java parts inside kt file. 2014-09-18 16:00:45 +04:00
Zalim Bashorov 30208d5532 Minor: drop semicolon in package declaration everywhere. 2014-09-16 19:32:37 +04:00
Nikolay Krasko 61b70d287e Update to 138.1283.4 EAP 2014-07-29 16:28:36 +04:00
Andrey Breslav d2ce6f5787 Safe identifier for the case of no name in PSI moved to 'descriptors' module, to be used in 'descriptor.loader.java' 2014-06-19 22:10:52 +04:00