Commit Graph

932 Commits

Author SHA1 Message Date
Andrey Breslav 707da9278f Do not skip delegated members in LIGHT_CLASSES mode 2014-06-19 22:10:57 +04:00
Andrey Breslav 622b7e3740 Do not report ACCIDENTAL_OVERRIDE on SAM adapters and such 2014-06-19 22:10:55 +04:00
Andrey Breslav 6bbc8ea951 Fix reporting errors on properties declared in constructors 2014-06-19 22:10:55 +04:00
Andrey Breslav 27f76630e6 ACCIDENTAL_OVERRIDE diagnostics supported
#KT-1 In Progress
2014-06-19 22:10:55 +04:00
Andrey Breslav d2e464a02b Tests for local classes in weird positions 2014-06-19 22:10:54 +04:00
Andrey Breslav 9cb71c7fa8 Test data fixed 2014-06-19 22:10:54 +04:00
Andrey Breslav 55cfa161c7 Report conflicting signatures that are purely inherited from traits
When all signatures are inherited from traits, the origin elements lie outside of the class in question
2014-06-19 22:10:54 +04:00
Andrey Breslav dd23b02dae Use safe names in codegen, for the case of light classes 2014-06-19 22:10:53 +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
Andrey Breslav bb581bb645 Only normalize names when accessing PSI, not earlier
#KT-4833 Fixed
2014-06-19 22:10:52 +04:00
Andrey Breslav f3c46341e5 Filtering out duplicate signature diagnostics if CONFLICTING_OVERLOADS or REDECLARATION is present 2014-06-19 22:10:51 +04:00
Andrey Breslav 851fbbc937 Test data fixed 2014-06-19 22:10:50 +04:00
Andrey Breslav 592328aa27 Test data fixed 2014-06-19 22:10:49 +04:00
Andrey Breslav 38333d6cea CONFLICTING_PLATFORM_DECLARATIONS moved to a JVM-specific class 2014-06-19 22:10:48 +04:00
Andrey Breslav 22c47c2f82 Highlight only declarations, without body, on platform signature clashes 2014-06-19 22:10:48 +04:00
Andrey Breslav 27e61a75a1 Diagnostic tests for duplicate JVM signatures 2014-06-19 22:10:46 +04:00
Svetlana Isakova 68b4b8e946 KT-5182 Data flow info is lost for 'when' branches
#KT-5158 Fixed
  #KT-4332 Fixed
2014-06-06 15:56:02 +04:00
Alexey Sedunov d2c055e9da Pseudocode: Introduce pseudo-value analysis 2014-06-03 18:17:05 +04:00
Andrey Breslav 37532e8d02 Compare return types when structurally comparing callables 2014-06-02 22:05:34 +04:00
Andrey Breslav 7f60ccf663 Support equalityAxioms in isSubtypeOf() 2014-06-02 22:05:33 +04:00
Andrey Breslav e50a17e668 Do not compare local classes by FqNames 2014-06-02 22:05:32 +04:00
Andrey Breslav 204fa76691 When checking overrides, compare methods structurally
Because they may come from different copies of the same class from different modules
2014-06-02 22:05:28 +04:00
Alexander Udalov 796912bfcb Provide implicit receiver to extension property initializer
This is safe because initializers for extension properties are forbidden
anyway, we'll just won't be generating noisy error messages about non-existent
'this'
2014-05-29 21:24:06 +04:00
Alexander Udalov d78d4bc44c Disallow extension properties with backing fields
#KT-1682 Fixed
2014-05-29 21:24:05 +04:00
Alexander Udalov 3c3d120004 Prohibit implicit overrides with lesser visibility
A non-abstract super-declaration is allowed to stand as 'an implementation' of
a fake override only if its visibility is not less than visibilities of all
other super-declarations

 #KT-2491 Fixed
2014-05-22 19:32:10 +04:00
Alexander Udalov db25f568dc Don't report "cannot infer visibility" on property accessors
If the diagnostic is already reported on the corresponding property, no need to
report it again for accessors
2014-05-22 19:32:10 +04:00
Alexander Udalov 9760f30c99 Don't allow fake override to inherit implementation with wrong return type
#KT-4763 Fixed
2014-05-22 19:32:10 +04:00
Andrey Breslav a66f44e4f5 TypeConstructor's equality for classes relies on FqNames
This is needed because different modules/libraries may define classes with the same FqNames, which may be identical or slightly different.
 Such classes must be considered equal, because your dependencies may rely on different packagings of the same codebase, and the classes there will be distinct though identical
  (think intellij-core vs idea-full).
2014-05-21 23:31:32 +04:00
Mikhael Bogdanov d73ffc2f48 Diagnostic update to support default parameters in inline methods 2014-05-21 13:56:08 +04:00
Svetlana Isakova e0f37bbef0 Generate parse error on label without name '@' 2014-05-20 15:07:03 +04:00
Svetlana Isakova 69e5444ddf Added tests on labels
#KT-1703 Fixed
 #KT-361 Fixed
 #KT-3920 Fixed
 #KT-3988 Fixed
 #KT-4247 Fixed
 #KT-4586 Fixed
 #KT-4603 Fixed
 #KT-591 Fixed
2014-05-20 15:06:59 +04:00
Alexander Udalov 845e3323f9 Create error type if reflection class isn't found
Introduce a new diagnostic fired when reflection types aren't found in the
classpath
2014-05-19 19:50:57 +04:00
Alexander Udalov c7a7f31e82 Introduce module 'reflection', move KFunctionN to it
Metadata for KFunction classes is now longer serialized along with built-in
classes. This effectively means that it's no longer possible to find KFunction
classes via dependency on built-ins. There should be a kotlin-runtime library
in the specified classpath for reflection types to be resolvable.

A lot of tests were moved and changed, because tests on callable references
require stdlib in classpath from now on
2014-05-19 19:50:57 +04:00
Andrey Breslav 8885d5709e Private inside a package should be visible only inside this package in the same module 2014-05-19 13:02:25 +04:00
Andrey Breslav 9983a567d4 Multi-module diagnostic tests supported
Test added for internal visibility
2014-05-19 13:02:25 +04:00
Mikhael Bogdanov 30e921fa89 Diagnostic: support anonymous objects in inline functions 2014-05-16 15:55:11 +04:00
Natalia Ukhorskaya a0549f0ff5 Evaluate expression: allow to call invisible members
#KT-4935 Fixed
2014-05-15 13:54:22 +04:00
Svetlana Isakova 73cd776715 Added test for KT-4640
#KT-4640 Obsolete
2014-04-30 13:54:21 +04:00
Svetlana Isakova 5a84ed4497 KT-4866 Resolve does not work inside brackets with unresolved reference before
#KT-4866 Fixed
2014-04-30 13:34:34 +04:00
Svetlana Isakova 775606f80a Do not remove trivial substitutions
to avoid substituting a new type parameter by default instead of leaving the same
 #KT-4887 Fixed
2014-04-30 13:34:34 +04:00
Svetlana Isakova 808cf75060 Fixed bug: resolution task wasn't recreated
The old resolved calls were used
2014-04-30 13:34:34 +04:00
Svetlana Isakova 928b28e080 Complete type inference for nested calls
inside non resolved invocation
2014-04-30 13:34:31 +04:00
Andrey Breslav 550c0ed998 Report "UNSUPPORTED" on usages of typedef 2014-04-29 19:12:55 +04:00
Andrey Breslav 31e859356f A test that fails in lazy mode (currently disabled) 2014-04-29 19:12:55 +04:00
Andrey Breslav f0a29f190b USELESS_HIDDEN_IMPORT diagnostic fixed for LAZY mode 2014-04-18 21:28:23 +04:00
Alexander Udalov 5e138a606b Report "cannot infer visibility" for delegated members 2014-04-17 19:51:32 +04:00
Alexander Udalov 1deb55bfde Add positioning strategy for diagnostics on illegal fake overrides
"funcitonTypes.kt" test data file was changed because now that there is a
positioning strategy, it takes the liberty of filtering out those diagnostics
that were reported on syntactically invalid elements
2014-04-17 19:51:31 +04:00
Alexander Udalov 5ae339d940 Fix "Cannot infer visibility" for fake overrides
#KT-4785 Fixed
2014-04-17 19:51:31 +04:00
Alexander Udalov 3dffd428ad Refactor OverrideResolver and OverridingUtil
Fix warnings, simplify code. Untangle a very complex code related to
diagnostics on multiple default values and different names of parameters in
supertypes; fix a bug there, add test
2014-04-17 19:51:30 +04:00
Alexey Sedunov 3952a121fb Pseudocode: Track PSI elements which correspond to jump instructions 2014-04-17 19:00:56 +04:00