Commit Graph

4079 Commits

Author SHA1 Message Date
Mikhail Glukhikh 5fabb962ae Private constructors are now accessed via synthetic constructor with DEFAULT_CONSTRUCTOR_MARKER as an additional argument #KT-6299 Fixed
A set of tests provided. Some external tests fixed accordingly.
Companion object creation changed accordingly.
Derived classes now can use base class with the private constructor.
Refactoring of AccessorForFunctionDescriptor.
2015-06-24 12:30:11 +03:00
Michael Bogdanov b1c5002889 Remove finally marker at inlining 2015-06-24 09:48:55 +03:00
Michael Bogdanov a018e4e12a Updated exception table generation: support new exception table in non-local returns 2015-06-24 09:48:55 +03:00
Michael Bogdanov 93c5a52d13 Updated exception table generation: try block return moved to uncatched interval
#KT-8148 Fixed
2015-06-24 09:48:55 +03:00
Alexander Udalov 0593b833b5 Check extension receiver properly for property references
Without this, the unrelated type specified on the LHS of a property reference
literal was considered to be an extension receiver of the candidate, and the
resolution was erroneously successul. This is only reproducible for properties,
because if we're trying to resolve an extension, we consider all properties
from the scope, even non-extensions, because there may be a property of an
extension-functional type (T.() -> R). (We don't do this for functions.)

 #KT-7430 Fixed
 #KT-7945 Fixed
2015-06-23 23:35:17 +03:00
Denis Zharkov 8412984774 Delete IdeaJdkAnnotationsReflectedTest
Kotlin JDK annotations are empty now
2015-06-23 16:44:47 +03:00
Denis Zharkov 80a7f79f12 Make jars with JDK/Android SDK annotations empty
- Compiler use them only for getting parameter names and we are OK to drop it
- IDE plugin can use jdkAnnotations from ideaSDK
2015-06-23 16:44:27 +03:00
Pavel V. Talanov 997a6f1381 Fix import resolution for some cases of malformed imports ("import some.")
Fix parsing import directives in case of non-identifier after "import"
Add diagnostics test for malformed imports
2015-06-23 15:19:14 +03:00
Pavel V. Talanov 37bcd455b5 Make ModuleDescriptor#getPackage() return not null lazy object with lazy scope
Refactor: no need to create package view in order to obtain its subpackages
LazyPackageViewDescriptorImpl to replace PackageViewDescriptorImpl
This allows to avoid computations when package views are requested but their contents not necessarily queried
For example: DescriptorResolver.resolvePackageHeader()
2015-06-23 15:19:06 +03:00
Pavel V. Talanov 1cf38e4799 Convert PackageViewDescriptor to Kotlin 2015-06-23 15:18:57 +03:00
Alexey Sedunov 3266d8c29a Parser: Disable joining complex tokens while parsing type references
#KT-8141 Fixed
2015-06-19 21:45:13 +03:00
Mikhail Glukhikh 065db07e1c More accurate check on an enum entry deprecated super constructor #EA-69735 Fixed 2015-06-19 13:50:49 +03:00
dnpetrov 36ae8790a1 KT-8011 Compiler crashes on attempt to create local class inside lambda
- use StackValue from upper-level context if local lookup fails

 #KT-8011 Fixed
2015-06-18 17:40:24 +03:00
dnpetrov 046189087a KT-5963 Call to super shouldn't require type specification if there is no conflict
Implemented unqualified 'super' type resolution (in BasicExpressionTypingVisitor).

No overload resolution of any kind is involved.
Corresponding supertype is determined by the expected member name only:
- 'super.foo(...)' - function or property (of possibly callable type) 'foo'
- 'super.x' - property 'x'
Supertype should provide a non-abstract implementation of such member.
As a fall-back solution for diagnostics purposes, consider supertypes with abstract implementation of such member.

Diagnostics:
- AMBIGUOUS_SUPER on 'super', if multiple possible supertypes are available;
- ABSTRACT_SUPER_CALL on selector expression, if the only available implementation is abstract.

#KT-5963 Fixed
2015-06-18 14:16:34 +03:00
Dmitry Jemerov e852b2d748 fix tests, sorry 2015-06-17 18:18:24 +02:00
Alexander Udalov 1a3209e1dc Drop traits with required classes
#KT-4771 Rejected
2015-06-17 16:23:58 +03:00
Alexander Udalov 98ce0d529c Fix incorrect 'original' in property accessors
#KT-3930 Fixed
2015-06-17 16:23:56 +03:00
Alexander Udalov 4dcc373a5a Fix concrete method inheritance in interfaces
For each non-abstract non-declared (i.e. inherited from supertypes) method in
an interface we generate its static form to the TImpl, which calls the TImpl
method from the corresponding supertype.

The accidental override tests changed because we're now trying to generate the
delegate for the super method, not knowing that it will clash with the declared
method

 #KT-2888 Fixed
 #KT-5393 Fixed
2015-06-17 16:23:56 +03:00
Alexander Udalov f81c364999 Add test cases for obsolete issues
#KT-3407 Obsolete
 #KT-4753 Obsolete
2015-06-17 16:23:55 +03:00
Dmitry Jemerov ab33e4935e restore perf output in command line; always remove it from output in tests 2015-06-17 14:53:09 +02:00
dnpetrov a2b2eba1a1 Extended version of AbstractWriteSignatureTest:
- support multiple expectations in file
- support field signature expectations
- report failures in a more usable format
2015-06-17 13:45:08 +03:00
Mikhail Glukhikh 707307b19c Fix for a cyclic generic upper bound for a class type parameter. A pair of tests. 2015-06-17 11:56:28 +03:00
Alexey Sedunov f08c7d0fd8 Call Resolver: Fix nullability of parenthesized safe calls used as value arguments
#KT-7903 Fixed
2015-06-16 21:15:29 +03:00
Dmitry Jemerov a0aba04338 rebase ate my changes 2015-06-16 18:11:19 +02:00
dnpetrov c369949d90 KT-6136 VerifyError on data class inheriting from trait
- coerce property values to proper data class component types
- add tests
 #KT-6136 Fixed
2015-06-16 09:58:03 +03:00
Alexander Udalov 4cfbf5886b Get rid of unneeded MessageCollector implementations 2015-06-15 15:42:40 +03:00
Mikhail Glukhikh e623aadf00 Exception fix: more accurate parsing of class base type #EA-65509 Fixed 2015-06-15 14:43:37 +03:00
Mikhail Glukhikh d77c6eb30e Exception fix: diagnose an error for a generic type which is a subtype of itself, a set of tests #EA-64453 Fixed 2015-06-15 14:43:24 +03:00
Mikhail Glukhikh 46d5290f70 Exception fix (equal returns true for the same types) #EA-65206 Fixed 2015-06-15 14:43:17 +03:00
Pavel V. Talanov 705f35450f Refactor setting dependencies for ModuleDescriptors 2015-06-13 20:36:47 +03:00
Denis Zharkov e3c3af6aab Change MISSING_CONSTRUCTOR_KEYWORD severity to error
And adjust testData
2015-06-12 11:23:13 +03:00
Denis Zharkov 414d6b92f6 Adjust testData: don't use java.lang.Class in annotations 2015-06-12 09:55:13 +03:00
Denis Zharkov da254ab1a0 Drop support of java.lang.Class as annotation parameter
Also drop some related diagnostics and testData
2015-06-12 09:55:12 +03:00
Denis Zharkov d71fe0d11a Drop JavaClassValue and it's usages
Also drop related testData
2015-06-12 09:55:10 +03:00
Denis Zharkov 2df6fcb785 Drop some tests using java.lang.Class in annotation
We are going to drop such cases anyway, but they're annoying when reverting commits
2015-06-12 09:55:02 +03:00
Denis Zharkov cf4b1ab7cd Drop obsolete annotations syntax 2015-06-12 09:55:00 +03:00
Denis Zharkov 26864a4407 Get rid of annotation syntax deprecation related things 2015-06-12 09:23:32 +03:00
Denis Zharkov 200dee2761 Replace deprecated annotations in whole project 2015-06-12 09:23:32 +03:00
Denis Zharkov c9f79c2d05 Adjust testData: get rid of obsolete annotations 2015-06-12 09:23:31 +03:00
Michael Nedzelsky 744e760444 tests for KT-7618 Compiling Maven project targeting JS fails when no source file present 2015-06-11 22:21:25 +03:00
Michael Nedzelsky 57356e29b8 kotlinc-js, kotlinc-jvm: report error on empty sources 2015-06-11 22:21:20 +03:00
Mikhail Glukhikh f9fe8cd341 Fixed annotation resolve for loop parameter or catched exceptions type 2015-06-10 18:38:27 +03:00
Mikhail Glukhikh 731e5d85a4 Annotation arguments resolve refactoring via ForceResolveUtil. Deptecated...Intention fixed accordingly 2015-06-10 18:38:25 +03:00
Alexander Udalov 64b60718e3 Finish off old deprecated function/extension function classes
This reverts commit d14e5b8a72.
2015-06-10 14:41:57 +03:00
Valentin Kipyatkov 4263c47f4d DescriptorRenderer: moved enums out 2015-06-10 11:34:59 +03:00
Valentin Kipyatkov a1ff2f20ed Got rid of DescriptorRendererBuilder providing new scheme for creating DescriptorRenderer's 2015-06-10 11:34:58 +03:00
Michael Nedzelsky 999c83240c JS: error message (not exception) for incompatible abi version during compilation 2015-06-10 05:37:57 +03:00
Mikhail Glukhikh a792b29a78 Exception fix: more accurate type annotation parsing #EA-69124 Fixed 2015-06-09 14:36:12 +03:00
Pavel V. Talanov 7585cbfe22 Remove check in visibilities that allowed access to privates of outer packages
It doesn't work for a while now in imports and is planned to be dropped with upcoming changes to private
2015-06-08 20:25:52 +03:00
Dmitry Jemerov 220403b6f6 avoid unnecessary creation of empty containers 2015-06-08 15:10:40 +02:00