Ilya Gorbunov
911940d458
InlineOnly annotation suppresses NOTHING_TO_INLINE diagnostics.
2016-01-28 19:37:44 +03:00
Mikhail Glukhikh
12b100c541
Regression test #KT-9529 Obsolete
2016-01-28 12:56:12 +03:00
Alexander Udalov
04026dbe84
Make Array<T>(size, init) a constructor of Array
...
It's not marked as inline, this is why 'crossinline' was added in
jaggedArray.kt/jaggedDeep.kt. Will be fixed in the following commits
2016-01-28 03:10:37 +03:00
Dmitry Petrov
9db3440e72
Fix type inference issues for 'if' and 'when'.
...
Use 'expectedType' (when present) as an explicit type argument for a special construct call.
Unfortunately, this approach can't be used for elvis due to other elvis-related inference hacks.
Fixes KT-10807, KT-10811.
This also affects KT-6189: now we can infer proper type for 'if'.
If type inference for special call failed, and we found no type errors in sub-expressions,
report TYPE_INFERENCE_FAILED_ON_SPECIAL_CONSTRUCT error.
This (and the hack above) fixes KT-10809: code no longer compiles.
2016-01-27 17:07:20 +03:00
Mikhail Glukhikh
d94930149b
Warning for open members in objects
2016-01-26 19:04:17 +03:00
Mikhail Glukhikh
1b8f938260
Report EXPOSED_PROPERTY_TYPE on a property name only #KT-10760 Fixed
2016-01-26 19:04:13 +03:00
Stanislav Erokhin
e53e152f83
Removed hacks for code migration from ConstraintSystemImpl.
2016-01-25 21:53:09 +03:00
Stanislav Erokhin
210c9ab3db
Minor. Added regression tests for: KT-3927, KT-9522, KT-10036, KT-7440, KT-9682, KT-9808, KT-9517, KT-9810, KT-9345.
2016-01-25 19:13:32 +03:00
Denis Zharkov
6c0cd70a22
Introduce PureReifiable annotation
...
It prevents reporting unsafe substitution warning on expressions
like 'arrayOf(arrayOf(""))'
2016-01-22 19:17:22 +03:00
Denis Zharkov
4cf1393e81
Minor. Render annotations on type parameters
2016-01-22 19:17:22 +03:00
Denis Zharkov
ae6c62ddff
Minor. Report reified-related diagnostics on arguments if possible
2016-01-22 19:17:22 +03:00
Dmitry Petrov
f371e67ce8
PatternMatchingTypingVisitor:
...
rewrite type inference for 'when' using special constructs.
This fixes several type inference issues for 'when':
KT-9929, KT-9972, KT-10439, KT-10463
along with some other diagnostics-related issues.
2016-01-22 10:41:55 +03:00
Michael Bogdanov
829978a37d
Added additional parameter for default methods
2016-01-22 10:10:32 +03:00
Ilya Gorbunov
25c4453dc5
Cleanup deprecated symbol usages in testData
2016-01-22 05:54:38 +03:00
Ilya Gorbunov
2813840769
Fix testData: diagnostics changed.
2016-01-22 05:54:38 +03:00
Ilya Gorbunov
f4822cd757
Fix testData in compiler: add collections and ranges package to fq-names.
2016-01-22 05:54:38 +03:00
Valentin Kipyatkov
d749f85a60
Inaccessible classes from the current package to not conflict with visible classes from somewhere else
2016-01-19 19:30:18 +03:00
Mikhail Glukhikh
e4f7446bec
JvmSynthetic forbidden for delegated properties (and searched for different use-site targets)
2016-01-19 11:38:53 +03:00
Mikhail Glukhikh
a2bba7c8f1
JvmField forbidden for delegated properties
2016-01-19 11:38:49 +03:00
Mikhail Glukhikh
ec909d0775
Volatile forbidden for delegated properties (and checked for other use-site targets)
2016-01-19 11:38:45 +03:00
Mikhail Glukhikh
b78d481bb1
delegate use-site targeted annotations: parser, front-end, codegen with some tests #KT-10502 Fixed
2016-01-19 11:38:41 +03:00
Denis Zharkov
e9693e987f
Humanize type mismatch diagnostic caused by type projections
...
#KT-10581 Fixed
2016-01-19 11:05:41 +03:00
Stanislav Erokhin
b185316a6e
Create new HidesMembers annotation
2016-01-15 23:32:34 +03:00
Valentin Kipyatkov
5a079defc7
"Rename on import" hides importing of the same symbol by other imports with the original name
2016-01-14 17:05:28 +03:00
Dmitry Petrov
609ffc10a9
KT-10322, KT-10646, KT-10647:
...
- update diagnostic to (supposedly) more useful
- also report IMPLICIT_CAST_TO_ANY if expected type is DONT_CARE
(effectively "no expected type" for lambda expression).
2016-01-14 10:08:20 +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
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
Mikhail Glukhikh
15746cbf56
Implicit callable type check refactoring, additional check for property with explicit Nothing type
2015-12-23 18:04:25 +03:00
Stanislav Erokhin
8b5a194dd6
Do not discriminate synthesized candidates.
...
#KT-9965 Fixed
2015-12-18 15:08:19 +03:00
Mikhail Glukhikh
f5989aa4f2
CallableMemberDescriptor.isOverridable / ClassDescriptor.isFinal refactoring
...
Extra JvmField and integer constants tests
2015-12-17 18:11:41 +03:00
Alexey Tsvetkov
7384d25cb3
Prohibit Array<Nothing>
2015-12-17 16:26:26 +03:00
Mikhail Glukhikh
3fb04aceb9
Check backing field availability for AnnotationTarget.FIELD #KT-10387 Fixed
...
Some duplicated checks deleted (UseSiteTargetChecker / JvmFieldApplicabilityChecker)
2015-12-17 15:06:58 +03:00
Mikhail Glukhikh
49e7417741
"as" in binary / unary expressions now checked only for original type conversion #KT-10384 Fixed
...
Also #KT-10386 Fixed
2015-12-15 12:02:33 +03:00
Mikhail Glukhikh
fdc9e9d7f5
Delegated properties never require backing field #KT-10107 Fixed
2015-12-14 12:26:37 +03:00
Alexander Udalov
239502368a
Update test data for tower resolution algorithm
...
- locals win
- unary calls to plus/minus are not supported in favor of unaryPlus/unaryMinus
- unqualified nested classes are temporarily reported as unresolved
- function without receiver win against extension function
- explicit import win against star import
2015-12-11 17:01:02 +03:00
Mikhail Glukhikh
c8b50eec1e
Enum.values: deprecation (warning) --> deprecation (error)
2015-12-11 11:11:42 +03:00
Dmitry Petrov
f34f7556bc
KT-10192 got fixed due to new if/when check
...
(which doesn't depend on the expected type for expression)
#KT-10192 Fixed
2015-12-01 10:36:40 +03:00
Alexander Udalov
d472154ea7
Remove KotlinSignature from tests, spec, delete tests with errors
2015-11-27 21:22:04 +03:00
Mikhail Glukhikh
ea4f167091
Calls to non-@JvmStatic protected members of companion objects from subclasses are now errors (unsupported yet)
2015-11-27 15:58:38 +03:00
Dmitry Petrov
9ccb1fd506
KT-9601, KT-10103:
...
Chose maximally specific function in callable reference
#KT-9601 Fixed
#KT-10103 Fixed
2015-11-26 12:52:12 +03:00
Stanislav Erokhin
f0cefd5583
Create hacks for magic annotations NoInfer, OnlyInputTypes and LowPriorityInOverloadResolution.
2015-11-25 20:53:39 +03:00
Dmitry Petrov
db42941586
Allow annotation constructor calls
...
in default parameter value expressions of anonymous classes
(if it is not a compile-time constant, it will be reported separately).
#KT-10136 Fixed
2015-11-25 18:06:08 +03:00
Mikhail Glukhikh
dc60c62781
Enum.values is now deprecated but Enum.values() is no more deprecated
2015-11-23 17:29:36 +03:00
Dmitry Petrov
7b432c878a
Diagnostics improvements for corner cases
...
(class/package qualifier in non-qualifier position).
2015-11-18 16:27:21 +03:00
Dmitry Petrov
9856af48ca
Drop createQualifier: testData update
2015-11-18 14:35:53 +03:00
Mikhail Glukhikh
41ebfd025e
More precise diagnostics of smart cast impossible #KT-7240 Fixed
2015-11-03 13:38:51 +03:00
Yan Zhulanow
33d67a3bf4
Fix JvmField applicability test data
...
(Annotation is not applied both to field & getter now)
2015-10-31 04:30:24 +03:00
Svetlana Isakova
c167a77c8a
Filter annotations while substituting compound type
2015-10-22 21:55:17 +03:00
Svetlana Isakova
f00af72e0f
Fixed 'OnlyInputTypes' working with platform types
2015-10-22 21:55:16 +03:00