Alexander Udalov
74ed3b9562
Provide equals/hashCode for Kotlin light classes
...
KotlinLightClassForExplicitDeclaration already had equals/hashCode, but the
other three implementations of KotlinLightClass did not; this resulted in type
mismatch errors in Java code where the signatures of a super method and the
corresponding sub method wouldn't match because types of parameters were
different
#KT-8543 Fixed
2015-07-23 03:51:50 +03:00
Mikhail Glukhikh
f551d64ea2
Refactoring: AnnotationTarget / AnnotationRetention renamed to KotlinTarget / KotlinRetention
...
(for not clashing with the same built-in classes)
2015-07-22 19:01:25 +03:00
Mikhail Glukhikh
414c44ade5
Make retention of 'kotlin.annotation.annotation' to SOURCE. Serialize / deserialize it instead. Some fixed tests.
2015-07-22 19:00:51 +03:00
Mikhail Glukhikh
11f87e6ca1
No more java Target / Retention loaded. Render java Retention / Target. Related test changes.
2015-07-22 19:00:39 +03:00
Mikhail Glukhikh
c2480d1183
Java to Kotlin annotation retention mapping + new test + JvmLoader test adaptation
2015-07-22 19:00:26 +03:00
Zalim Bashorov
679d5fe496
Introduce UsageCollector
2015-07-21 22:27:27 +03:00
Zalim Bashorov
91b87f41bc
incremental.cache -> incremental.components; IncrementalCacheProvider -> IncrementalCompilationComponents
2015-07-21 22:27:26 +03:00
Zalim Bashorov
df4f43267b
Provide location parameter in delegations
2015-07-21 22:27:26 +03:00
Zalim Bashorov
41449c107e
Location.NOWHERE -> UsageLocation.NO_LOCATION
2015-07-21 22:27:25 +03:00
Zalim Bashorov
e2e3520c3d
Add location parameter to JetScope::getClassifier
2015-07-21 22:27:25 +03:00
Zalim Bashorov
0f92036353
Add location parameter to JetScope::getFunctions
2015-07-21 22:27:25 +03:00
Zalim Bashorov
f79155df97
Add location parameter to JetScope::getProperties
2015-07-21 22:27:24 +03:00
Stanislav Erokhin
9e36e5a8b1
Not store call to resolutionResultsCache in INDEPENDENT mode
2015-07-21 21:50:27 +03:00
Stanislav Erokhin
f802d79305
Minor. move method
2015-07-21 21:50:27 +03:00
Pavel V. Talanov
4e0d2bc23c
CompileTimeConstantUtils: use getConstant instead of evaluate
...
Hacky way to avoid passing builtins into this code
2015-07-21 20:52:43 +03:00
Pavel V. Talanov
855e3d2bf4
Inject ConstantExpressionEvaluator in BasicExpressionTypingVisitor via ExpressionTypingComponents
2015-07-21 20:52:42 +03:00
Pavel V. Talanov
add8387141
Fix some problems with jsCode function
...
1. Fix a bug in frontend when passing non-String constant led to exception
2. Fix a bug in backend when passing non-JetStringTeplate string constant led to exception
3. Avoid recomputing constant argument in backend
2015-07-21 20:52:42 +03:00
Pavel V. Talanov
b4825ada69
Refactor ExpressionTypingVisitorDispatcher
...
Inject in in ExpressionTypingServices
2015-07-21 20:52:41 +03:00
Dmitry Petrov
6437a4bdc6
Support overload ambiguity resolution for callable references by expected type.
...
Resolve callable references taking into account expected callable types.
This affects call resolution procedure (resolve 'foo' in for 'foo(::bar)') similar to the approach used for function literals:
* During "shape arguments" phase of call resolution, callable references are resolved in independent context without expected type. If the callable reference is ambiguous, its shape type is a function placeholder type without parameter types and return type information. Otherwise, it is a reflection type for the resolved function or property. Upper-level call is resolved without taking into account ambiguous callable references.
* During "complete call" phase of call resolution, resolve callable reference arguments to actual descriptors (if possible), and update constraint system for the given call accordingly.
#KT-6982 Fixed
#KT-5780 Fixed
2015-07-21 18:33:15 +03:00
Dmitry Jemerov
b791ea03a9
code cleanup: cli-common module
2015-07-21 16:21:48 +02:00
Dmitry Jemerov
6a6f369e5d
code cleanup: plugin-api module
2015-07-21 16:20:56 +02:00
Dmitry Jemerov
43d2af166e
code cleanup: light-classes module
2015-07-21 16:20:56 +02:00
Dmitry Jemerov
a73df901ae
code cleanup: frontend.java module
2015-07-21 16:20:55 +02:00
Dmitry Jemerov
6bf934b472
code cleanup: frontend module
2015-07-21 16:20:51 +02:00
Dmitry Jemerov
e6776ebd8e
code cleanup: container module
2015-07-21 16:20:12 +02:00
Dmitry Jemerov
7c2b2dcc6a
code cleanup: backend-common, cli modules
2015-07-21 16:20:11 +02:00
Dmitry Jemerov
7db1650149
code cleanup: ant, backend modules
2015-07-21 16:20:10 +02:00
Valentin Kipyatkov
14b63759a9
Added comment
2015-07-21 16:00:10 +03:00
Mikhail Glukhikh
94a00540be
Targeting / retention for a set of standard annotations, some inapplicable annotation checks replaced with target check, some fixed tests
2015-07-21 15:36:53 +03:00
Mikhail Glukhikh
9e7a67fabf
Warning about java.lang.annotation.Target annotation usage
2015-07-21 15:20:37 +03:00
Mikhail Glukhikh
1309c1f95f
Annotation mapper is introduced to map java annotation targets to kotlin targets + a set of new / fixed tests
2015-07-21 15:20:31 +03:00
Denis Zharkov
3ec00114c0
Check type of elvis with expected type info
...
#KT-6713
2015-07-21 15:16:06 +03:00
Denis Zharkov
53edb83a56
Minor. More strict precondition for SAM adapter creation
...
Descriptor should be initialized before creating SAM adapter
2015-07-21 15:16:06 +03:00
Denis Zharkov
58e7923218
Use substituted return type for SAM adapeter of constructor
...
#KT-7282 Fixed
2015-07-21 15:16:06 +03:00
Denis Zharkov
97af85da9c
Change default upper bound of Java type parameters to Any!
...
#KT-7672 Fixed
2015-07-21 15:16:05 +03:00
Valentin Kipyatkov
0d09c55bac
JetPackageDirective made not JetExpression
2015-07-21 08:36:36 +03:00
Valentin Kipyatkov
fac55b60fa
Lazy computation of smart cast types for receivers in call resolve
2015-07-21 08:32:52 +03:00
Valentin Kipyatkov
4ec26de2a8
Changes on code review
2015-07-21 08:32:51 +03:00
Valentin Kipyatkov
31b7c33fa8
No need to scan base classes
2015-07-21 08:32:51 +03:00
Valentin Kipyatkov
1c52f8a524
Fixed synthetic properties for method inherited from two bases
2015-07-21 08:32:51 +03:00
Valentin Kipyatkov
612c009f6b
Synthetic properties: correct behaviour for method hierarchies
2015-07-21 08:32:51 +03:00
Valentin Kipyatkov
367e294452
No synthetic properties in java class for methods inherited from Kotlin
2015-07-21 08:32:50 +03:00
Valentin Kipyatkov
e0e7044032
Synthetic properties: fixed completion and inspection for generic class
...
+ fixed KT-8539 No completion of generic extension function for <*> type arguments
#KT-8539 Fixed
2015-07-21 08:32:50 +03:00
Valentin Kipyatkov
d2fb7381ce
Tested one more case
2015-07-21 08:32:50 +03:00
Valentin Kipyatkov
4a8adacedd
Changed policy for properties from methods like "getURL()""
2015-07-21 08:32:50 +03:00
Valentin Kipyatkov
23cfe88b71
KT-8530 Synthetic properties doesn't work with smart casts
...
#KT-8530 Fixed
2015-07-21 08:32:50 +03:00
Valentin Kipyatkov
b6027a0efe
Changed synthetic properties naming for getters starting with "is"
2015-07-21 08:32:49 +03:00
Valentin Kipyatkov
08ac0ae7a0
Renamed classes
2015-07-21 08:32:49 +03:00
Ilya Ryzhenkov
eb97005cb5
Avoid creating SimpleResolutionContext in ConstantExpressionEvaluator to updateNumberType
2015-07-20 20:58:20 +03:00
Ilya Ryzhenkov
84236992cb
Replace Injected properties with constructor parameters when it doesn't cause cycles
2015-07-20 20:58:19 +03:00