Commit Graph

29044 Commits

Author SHA1 Message Date
Pavel V. Talanov 004c266433 Minor: fix missed error marker in test data 2015-12-29 18:13:10 +03:00
Ilya Gorbunov 0aef321c73 Cleanup in idea plugin, src and tests 2015-12-29 18:04:24 +03:00
Ilya Gorbunov 145722b20d Cleanup in idea plugin modules, misc 2015-12-29 18:04:23 +03:00
Ilya Gorbunov 865fdd7962 Cleanup in idea plugin modules, idea-core 2015-12-29 18:04:22 +03:00
Ilya Gorbunov 6ffc407158 Cleanup in idea plugin modules, idea-completion 2015-12-29 18:04:21 +03:00
Ilya Gorbunov be590312f7 Cleanup in idea plugin modules, idea-analysis 2015-12-29 18:04:20 +03:00
Ilya Gorbunov bce9514739 Cleanup in idea plugin modules, ide-common 2015-12-29 18:04:19 +03:00
Ilya Gorbunov fcfb063eca Cleanup in modules: j2k, jps, ant and generators. 2015-12-29 18:04:18 +03:00
Ilya Gorbunov da4b1ae0fb Cleanup in js modules 2015-12-29 18:04:16 +03:00
Ilya Gorbunov 80916d5ed7 Cleanup in compiler modules 2015-12-29 18:04:15 +03:00
Ilya Gorbunov 911adfd04d Cleanup in core modules 2015-12-29 18:04:14 +03:00
Ilya Gorbunov b71b336a69 Fix fq names of moved facade classes in imports and other code occurrences 2015-12-29 18:04:13 +03:00
Nikolay Krasko f9944e28b0 Show full library panel. Add warning on attempt to create project without library. 2015-12-29 18:01:15 +03:00
Michael Bogdanov d54c3f4fc7 Added '@' to annotation names in diagnostic messages 2015-12-29 17:20:16 +03:00
Michael Bogdanov 91f27ba176 Report error on 'JvmStatic' annotation on const or @JvmField property
#KT-10415 Fixed
2015-12-29 17:20:07 +03:00
Michael Bogdanov ae4ca3b5bb Report JvmStatic diagnostic on primary constructor properties 2015-12-29 16:45:24 +03:00
Michael Bogdanov bb63bcd520 Removed obsolete tests 2015-12-29 16:45:24 +03:00
Michael Bogdanov e671d05105 Companion public val annotated with @JvmFIeld or const 2015-12-29 16:45:23 +03:00
Michael Bogdanov e116cc3206 Private visibility for non-const, non-jvmField class companion property backing field 2015-12-29 16:45:22 +03:00
Michael Bogdanov 85ae0cb78e Restrict companion properties copying to interface by const 2015-12-29 16:45:22 +03:00
Pavel V. Talanov 6f0c2a0260 Project configuration: Add source directories for kotlin builtIns to KotlinRuntime 2015-12-29 15:57:02 +03:00
Pavel V. Talanov 9096a443ea Do not build light classes for local classes when the there is no class descriptor
These cases should be dealt with and this is only a way to degrade gracefully
2015-12-29 15:57:01 +03:00
Pavel V. Talanov b38fc7b3c1 Parse local interfaces in expression position 2015-12-29 15:57:00 +03:00
Pavel V. Talanov 1c4d4f3e36 Create class descriptors for local classes in illegal positions
Typecheck code in illegal selector position
Fixes exceptions on "val p = A.class" erroneous code
2015-12-29 15:56:44 +03:00
Pavel V. Talanov 06e829936e Fix codegen predictor for properties and property accessors 2015-12-29 12:32:14 +03:00
Pavel V. Talanov 4f5f56e4a5 Add and use KtPropertyAccessor#getProperty() 2015-12-29 12:32:12 +03:00
Denis Zharkov d511059cfa Unify code generation of as/is operation
They should be the same for common and reified cases
2015-12-28 18:32:15 +03:00
Denis Zharkov da53d8cbf4 Replace reified operations instanceof/checkcast with is/as
It's more consistent with how they effectively work
2015-12-28 18:31:40 +03:00
Denis Zharkov 87b6374351 Get rid of redundant intrinsic
Also drop 'safe' parameter from TypeIntrinsics.checkcast,
because it's supposed to work as JVM checkcast (i.e. accepting nulls)
2015-12-28 18:31:40 +03:00
Denis Zharkov 39bbd7c795 Rework reified markers format
Use integer operation identifier instead of method name to differentiate
reified operations
2015-12-28 18:31:40 +03:00
Alexander Udalov 890c961383 Fix reflection internal error on enum nested classes query
#KT-10520 Fixed
2015-12-28 16:40:34 +03:00
Denis Zharkov 688a1b6305 Adjust type approximation to broken code and missing dependencies
- Do not run approximation if arguments number is different
- Add nullable Any? as supertype to MissingDependencyErrorClass

The latter is needed because otherwise TypeArgument.isConsistent became false
2015-12-28 11:13:39 +03:00
Denis Zharkov 722a152a74 Fix supertypes calculation for types with projections
Use captured types as replacement for non top-level entries

 #KT-7296 Fixed
2015-12-28 11:13:39 +03:00
Denis Zharkov 397d2ca312 Fix captured approximation for case of flexible types
#KT-9294 Fixed
2015-12-28 11:13:38 +03:00
Denis Zharkov b6edddbe8b Make project compilable after member scope refinement 2015-12-28 11:13:38 +03:00
Denis Zharkov ec0ec55ab5 Replace type entries of JsContext<*> with JsContext<JsNode>
It's needed to make method calls (e.g. replaceMe) on it typesafe,
otherwise it's value parameter type is subtype of captured
2015-12-28 11:13:37 +03:00
Denis Zharkov 9773e98d8a Refine type from property setter parameter on assignment
In most cases these types are equals, the only known exception is
var-property contained in projected type member scope (see test data)
2015-12-28 11:13:37 +03:00
Denis Zharkov e2c02f825f Refine member scope for types with projections
Instead of erasing descriptors with conflicting substitution,
use invariant CapturedType(<projection>) as replacement for type parameter
within default member scope.

After substitution leave such types 'as is' everywhere except return types,
use common approximation for them.

 #KT-9294 In Progress
 #KT-5411 Fixed
 #KT-8647 Fixed

 #KT-9462 Fixed
 #KT-9893 Fixed
 #KT-7581 Fixed
 #KT-7296 In Progress
2015-12-28 11:13:37 +03:00
Denis Zharkov 365ff593f3 Extract and normalize member scope calculation
Basically it's wrong to use original types' member scope
as a worker for SubstitutionScope.
Member scope should always be determined by type constructor's default one
and substitution/arguments

 #KT-10448 Fixed
2015-12-28 07:44:56 +03:00
Denis Zharkov 58caff3411 Minor. Add tests checking not-null assertions
More precisely these tests check cases when expected type
was somehow obtained from captured type (in member scope with projections)
2015-12-28 07:44:56 +03:00
Denis Zharkov 7aaa6422b4 Introduce CustomSubstitutionCapability.substitutionToComposeWith
Mainly it's needed to prevent creation of subsituions composition
everytime we replacing arguments, because it's both unoptimal and wrong

When replace arguments in `A<E, F>` with <String, E> you got `A<String, String>`
as a result, that is unexpected.

But composition is only needed when previous substituion was abnormal
(e.g. RawSubsitution that should actually wrap new arguments), see RawTypes tests
2015-12-28 07:44:55 +03:00
Denis Zharkov 8d0a90a838 Preserve type capabilities of captured type 2015-12-28 07:44:55 +03:00
Denis Zharkov e7dbcfe21f Minor. Cleanup code 2015-12-28 07:44:54 +03:00
Denis Zharkov 555286849e Minor. Move declaration closer to usages and optimize imports 2015-12-28 07:44:54 +03:00
Denis Zharkov 48b89a5db7 Replace unchecked 'is' on local class with unchecked 'as'
It became unchecked after latest changes (see parent commit)
2015-12-28 07:44:54 +03:00
Denis Zharkov 3fd35636ad Fix type parameter list for local classes
Add captured parameters from enclosing functions

 #KT-9584 Fixed
2015-12-28 07:44:53 +03:00
Denis Zharkov 73b961e885 Clean project code after #KT-3996 fix
No overload resolution ambiguity in smart-casts
2015-12-28 07:44:53 +03:00
Mikhail Glukhikh 0cc09872b6 Implicit exhaustive when annotation / highlighting 2015-12-26 10:46:44 +03:00
Mikhail Glukhikh 7d6ccc40c2 Implicit exhaustive whens now have exception in else branch #KT-8700 Fixed 2015-12-26 10:46:39 +03:00
Mikhail Glukhikh 011a9f23b9 Implicit exhaustive when check for definite variable initialization (KT-8700) 2015-12-26 10:46:35 +03:00