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
Mikhail Glukhikh
011a9f23b9
Implicit exhaustive when check for definite variable initialization (KT-8700)
2015-12-26 10:46:35 +03:00
Mikhail Glukhikh
b93894953d
Exhaustive whens without else and 'Nothing' as the result are considered 'implicit exhaustive'
2015-12-26 10:46:11 +03:00
Mikhail Glukhikh
b805ce06c2
CFG exhaustive when else instruction for KT-8700
2015-12-26 10:46:01 +03:00
Alexander Udalov
75f046fa81
Drop Throwable#printStackTrace, make it a JVM-specific extension
2015-12-25 20:16:18 +03:00
Stanislav Erokhin
3d44471659
KT-10483 Missing smart cast on variable in variable as function call
...
#KT-10483 Fixed
2015-12-25 20:13:08 +03:00
Mikhail Glukhikh
99a32b93fb
Implemented missed checks for local functions #KT-10449 Fixed
...
Relevant code/test fixes
2015-12-23 18:22:32 +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
Mikhail Glukhikh
6b8b39a7bd
Intersection types are no more allowed in signatures #KT-10244 Fixed
2015-12-23 18:04:21 +03:00
Mikhail Glukhikh
60521e20ff
SETTER_VISIBILITY_DIFFERS_FROM_LATEINIT_VISIBILITY diagnostic removed
2015-12-23 17:48:28 +03:00
Dmitry Petrov
00db7d150b
Fix KT-10472: compare all overloads including varargs in a single pass.
2015-12-23 10:05:40 +03:00
Dmitry Petrov
142e85be04
Prohibit functions (and constructors) with multiple vararg parameters.
2015-12-22 10:40:41 +03:00
Alexander Udalov
7449ad2763
Rename Extension annotation to ExtensionFunctionType
...
The old one is kept temporarily and will be removed later
2015-12-21 20:33:32 +03:00
Andrey Breslav
a7e7d53e2b
Reserve "async* {}", extend the quick-fix
2015-12-21 07:15:37 +03:00
Andrey Breslav
45074841a4
Minor. Additional test for "async {}"
2015-12-21 07:15:37 +03:00
Stanislav Erokhin
1574dc78df
Synthetic extensions wins against top-level extension.
2015-12-18 22:49:25 +03:00
Andrey Breslav
6155d836a5
'async' reserved in front of function literals
2015-12-18 21:20:54 +03:00
Andrey Breslav
75ab0dd509
'sealed' reserved in front of when
2015-12-18 21:20:54 +03:00
Dmitry Petrov
09f53ea0bb
Select most specific overloaded function/property by explicitly used arguments only.
...
Major rewrite of OverloadingConflictResolver.
2015-12-18 18:30:16 +03:00
Stanislav Erokhin
8b5a194dd6
Do not discriminate synthesized candidates.
...
#KT-9965 Fixed
2015-12-18 15:08:19 +03:00
Stanislav Erokhin
1b6f96ac2b
Minor. update diagnostics/ReadMe.md
2015-12-18 15:08:18 +03:00
Stanislav Erokhin
7521b89b3e
Resolve unaryPlus as plus with error.
2015-12-17 20:21:01 +03:00
Denis Zharkov
0d7c8635b3
Refine INSTANCE_ACCESS_BEFORE_SUPER_CALL check
...
- Detect usages of unitialized `this` as extension receiver argument
- Make it work within object literal created before super call
#KT-9120 Fixed
#KT-8289 Fixed
2015-12-17 19:56:38 +03:00
Mikhail Glukhikh
fe57a9e48f
Setter visibility must be worse or the same as property visibility
2015-12-17 19:03:06 +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
Alexander Udalov
0ba0ea5e1f
Report 'unsupported' on synthetic Java property references
...
#KT-8575 Open
2015-12-16 19:50:15 +03:00
Zalim Bashorov
8fa2e28729
Add usages of inherited static members from nested object
2015-12-15 20:07:33 +03:00
Zalim Bashorov
51a8d5b9f0
Allow to use static members from companion object's parents
2015-12-15 19:41:15 +03:00
Zalim Bashorov
69c2668530
Don't allow to use own members when resolve super constructor call in (companion) object
2015-12-15 19:41:14 +03:00
Zalim Bashorov
e9ea4cc953
Don't allow to use own nested classes when resolve header of (companion) object
2015-12-15 19:41:13 +03:00
Denis Zharkov
b4bb92d136
Fix overload resolution ambiguity for types intersection
...
There are two different forms of types intestion:
1. Type parameters with multiple bounds
2. Smart casts
The problem was that when member scope of type intersection contained
effective duplicates and that lead to overload resolution ambiguity in
strange cases like `x.hashCode()`
For first type we do effectively the same thing as when building member
scope for class extending several interfaces: group all descriptors by
both-way-overridability relation and then choose most-specific in each
group.
For smart casts we do basically the same thing but with special
treatments:
1. From all descriptors that _equal_ to most specific we choose
the one that works without smartcast if possible (i.e. we choose first from candidates list)
2. If smart-cast value seems to be unstable we use only member scope
of receiver type + all descriptors from smart cast possible types
that has incompatible signature. If we'd include all of them and
choose one as more specific, and it would lead to false
SMART_CAST_IMPOSIBLE (see test unstableSmartCast.kt)
#KT-3996 Fixed
#KT-10315 Fixed
2015-12-15 16:18:31 +03:00
Denis Zharkov
8d0c3281cd
Choose first non-flexible when selecting most specific
2015-12-15 16:18:31 +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
Dmitry Jemerov
8db3fb03f9
remove support for "package.foo.bar" syntax inside files
2015-12-14 13:22:54 +01:00
Mikhail Glukhikh
fdc9e9d7f5
Delegated properties never require backing field #KT-10107 Fixed
2015-12-14 12:26:37 +03:00
Ilya Gorbunov
4dde59368c
Fix tests not to duplicate array constructor definitions as they are available now in builtins.
2015-12-14 04:29:18 +03:00
Alexander Udalov
5e421b4024
Improve type parameter bound diagnostic location
...
If there's only one erroneous bound (vast majority of cases), report it on the
bound; otherwise (to avoid reporting it several times) report on the type
parameter declaration
2015-12-13 02:06:07 +03:00
Denis Zharkov
871fe7680b
Load special override as HIDDEN in case of signature clash
...
#KT-10151 Fixed
2015-12-11 22:41:03 +03:00
Mikhail Glukhikh
00504a3f6d
Private setter for open property: take containing class modality into account #KT-10325 Fixed
2015-12-11 18:54:28 +03:00
Stanislav Erokhin
39b6637c7c
Fix exception from InvokeProcessor when we get invoke from extension function type.
2015-12-11 17:01:04 +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
Stanislav Erokhin
66a031f7a0
Do not enter in recursion for implicit invoke on variable with un inferred type
2015-12-11 17:01:01 +03:00
Mikhail Glukhikh
6fb871a088
A set of additional tests for complex expressions DFA
2015-12-11 15:17:37 +03:00
Mikhail Glukhikh
d024045638
Data flow values for Elvis / parenthesized expressions, smart casts on them
2015-12-11 15:17:29 +03:00
Mikhail Glukhikh
745a3aeeac
Accurate representation of smart casts on complex expressions
2015-12-11 15:17:25 +03:00
Mikhail Glukhikh
7cd867b936
DFA: take into account if / else and when expression assignments #KT-10002 Fixed
...
Also #KT-7479 Fixed
2015-12-11 15:17:22 +03:00
Mikhail Glukhikh
c8b50eec1e
Enum.values: deprecation (warning) --> deprecation (error)
2015-12-11 11:11:42 +03:00
Mikhail Glukhikh
3254641c5a
Local sealed classes: warning --> error
2015-12-11 11:11:34 +03:00