Commit Graph

2463 Commits

Author SHA1 Message Date
Zalim Bashorov d032b5589c Frontend: fixed resolve annotation parameters on properties, accessors, accessor parameters, function parameters when not need complete analysis. 2014-01-27 15:34:55 +04:00
Andrey Breslav ab7d8a7734 Tests for abstract functions with default arguments 2014-01-23 17:59:18 +04:00
Andrey Breslav 4ab0b00bd3 Support [throws] annotation 2014-01-23 17:59:18 +04:00
Andrey Breslav b66a76e7d2 xxx$default() function should be visible from Java 2014-01-23 17:59:17 +04:00
Andrey Breslav 39234b4d3e Delegated members should not be synthetic
Otherwise they are invisible to Java code
2014-01-23 17:59:17 +04:00
Evgeny Gerashchenko d3570153ef Fixed mapping generic type with multiple bounds from Java to Kotlin.
#KT-3480 fixed
2014-01-23 12:33:58 +04:00
Alexander Udalov 09e772ff61 Make comparison with NaN consistent with javac 2014-01-22 21:20:09 +04:00
Alexander Udalov db9d0e381b Rework BuiltInsSerializer
BuiltInsSerializer will be distributed with Kotlin compiler from now on. This
will allow to serialize binary data of built-ins on 'ant dist', as opposed to
storing all *.kotlin_class files in the repository: ant dist will just invoke
this serializer from bootstrap-compiler.jar
2014-01-22 19:11:43 +04:00
Andrey Breslav 04b47439bd Use findAnnotation() instead of iterating through all annotations 2014-01-22 19:04:43 +04:00
Evgeny Gerashchenko 357fc55358 KT-4456 Generated wrong bytecode when Kotlin class inherited from Java Interface with method which have SAM type argument
#KT-4456 fixed
2014-01-22 16:09:03 +04:00
Andrey Breslav ce1702d633 Replace a hack (Internals class) with a less-of-a-hack workaround
LockBasedLazyResolveStorageManager is put into the same package as LockBasedStorageManager
2014-01-20 23:01:19 +04:00
Andrey Breslav 4936b66626 Do not hide annotations on light classes 2014-01-20 22:35:01 +04:00
Andrey Breslav 6ce0b9b919 Annotations used instead of List<AnnotationDescriptor> 2014-01-20 16:17:54 +04:00
Andrey Breslav 314b1e371b Test for the case when annotation arguments contain null in Java
This is an error in Java, but it may be present in the source by mistake
2014-01-20 16:17:53 +04:00
Andrey Breslav 8f56283771 Same storage manager used by lazy resolve session in AnalyzerFacadeForJVM and the rest of the components 2014-01-20 16:17:53 +04:00
Nikolay Krasko 559f212cfc Redeclaration for same file in different files 2014-01-17 17:28:13 +04:00
Evgeny Gerashchenko ae4c68830d Importing root scope without members. 2014-01-16 22:11:55 +04:00
Natalia Ukhorskaya 14f4b6e4b4 Update android annotations. Do not add jdk annotations for android sdk 2014-01-15 18:00:46 +04:00
Alexey Sedunov e2118b7ae8 Tests for additional lazy resolve (local classes/objects in class initializers) 2014-01-15 16:49:29 +04:00
Alexey Sedunov adddb70e50 Add codegen tests for local classes/objects declated in class initializers or class parameter initializers 2014-01-15 16:49:28 +04:00
Ilya Klyuchnikov 5fb81aaa8b filtering incorrect annotation from idea jdk annotations, filtering problematic class javax.management.openmbean.TabularDataSupport from ValidityTest 2014-01-15 16:40:45 +04:00
Andrey Breslav df88e3e625 Introducing dependency kinds to prioritize package fragments 2014-01-15 16:16:21 +04:00
Andrey Breslav 2e4d166d6f Loading deseralized descriptors integrated with loading from bare Java code 2014-01-15 16:16:19 +04:00
Andrey Breslav 1f382ca744 JavaDescriptorResolver exposes ModuleDescriptor 2014-01-15 16:16:17 +04:00
Andrey Breslav 7ebaeae37e Tests regenerated 2014-01-15 16:16:17 +04:00
Andrey Breslav 372ab7954b Got rid of getExactlyOnePackageFragment() 2014-01-15 16:16:16 +04:00
Andrey Breslav 45bd70daec JavaPackageFragmentProvider is only accessible through JavaDescriptorResolver
We need this to guarantee that only one provider is used: either lazy or eager.
2014-01-15 16:16:16 +04:00
Andrey Breslav a26c37419e Synthetic classes created for enum entries 2014-01-15 16:14:58 +04:00
Andrey Breslav 31d4993406 Properly handle @NotNull for arrays 2014-01-15 16:14:50 +04:00
Evgeny Gerashchenko c924a5d097 Test for KT-3444 Front-end doesn't check if local function or function of anonymous class returns value
#KT-3444 obsolete
2014-01-14 19:13:19 +04:00
Evgeny Gerashchenko e994b718cb KT-4351 Cannot resolve reference to self in init of class local to function
#KT-4351 fixed
2014-01-14 19:13:16 +04:00
Evgeny Gerashchenko 958f7c862d Got rid of "namespace" word in test data. 2014-01-14 18:06:50 +04:00
Evgeny Gerashchenko b41a3f8558 Got rid of "namespace" word in compiler code. 2014-01-14 18:06:50 +04:00
Evgeny Gerashchenko 093afeb05c Renamed diagnostics (namespace → package). 2014-01-14 18:06:49 +04:00
Evgeny Gerashchenko 73ad5552c8 RootNamespaceExpression → RootPackageExpression. 2014-01-14 18:06:49 +04:00
Evgeny Gerashchenko 791b5bb84c JetNamespaceHeader → JetPackageDirective. 2014-01-14 18:06:48 +04:00
Evgeny Gerashchenko 4239f5bb18 Got rid of "namespace" word in backend. 2014-01-14 18:06:47 +04:00
Evgeny Gerashchenko 5319c6e24c LazyResolveNamespaceComparingTest → LazyResolveRecursiveComparingTest 2014-01-14 18:06:47 +04:00
Evgeny Gerashchenko 7e7908b831 Got rid of "namespace" term in descriptors module. 2014-01-14 18:05:58 +04:00
Evgeny Gerashchenko 2189fce64b Renamed class. 2014-01-14 18:05:57 +04:00
Alexander Udalov 7041a10ecf Fix VerifyError on primitive override properties
Don't just blindly map property type in PropertyCodegen when generating getter:
we already have its full signature, so we can just as well take the type from
it. The former also isn't correct for properties which are overrides with a
primitive type. Simple mapType is safe for setter though, because the type of a
method parameter cannot change with override on JVM

The change in StackValue relates to call sites of properties which return Unit:
in that case StackValue's this.type is V, whereas the return type of its getter
is Ljet/Unit; -- so coerceTo was coercing from the wrong type in case of getter
calls

 #KT-4373 Fixed
 #KT-4383 Fixed
2014-01-14 17:52:27 +04:00
Andrey Breslav 65d90e18a2 Use DescriptorRenderer to render annotations everywhere 2014-01-14 16:37:50 +04:00
Nikolay Krasko c0187ffcd1 Always create descriptors for class object psi element in lazy resolve
KT-4397 Exception: @NotNull method org/jetbrains/jet/lang/resolve/lazy/ResolveSession.getClassDescriptor must not return null

 #KT-4397 Fixed
2014-01-13 16:14:59 +04:00
Alexey Sedunov 446941257b KT-4392 #Fixed 2014-01-09 15:20:17 +04:00
Andrey Breslav 161998d2b8 Recursion detection fixed for memoized functions 2013-12-30 19:43:17 +04:00
Alexander Udalov 713c6f13ae Fix primitive override problem in Kotlin-Java inheritance
See the comment in JetTypeMapper
2013-12-30 06:41:09 +04:00
Alexander Udalov ace326f4cf Remove JetTypeMapper.map{G,S}etterSignature
Merge their logic with mapSignature()
2013-12-30 04:15:21 +04:00
Svetlana Isakova 4657a4b271 fixed bug in renderer for violated upper bound error 2013-12-27 16:02:16 +04:00
Svetlana Isakova c3ff6a2430 fixed exponential building of cf graph
if there was en error in chained qualified expression
2013-12-27 16:02:16 +04:00
Svetlana Isakova 531d337486 changed default positioning strategy:
added special handling for JetObjectLiteralExpression
2013-12-27 16:02:15 +04:00