Commit Graph

7729 Commits

Author SHA1 Message Date
Alexander Udalov bb92655ecd Prohibit creation of JetLightClass on built-ins
If we allow JetLightClass to be created on built-in types, a normal codegen
would be launched, with a mapping from Kotlin to Java types enabled, every time
IDE requests built-in classes. Codegen would then try to make something
meaningless, e.g. create a class for a primitive type (since our jet.Boolean is
mapped to primitive boolean). This would result in different exceptions when
navigating to built-in library from IDE.

Add a helpful error message to ClassFileFactory if we ever again produce
classes for primitive types.
2012-09-11 17:08:33 +04:00
Alex Tkachman 4eea0cafb9 test for obsolete KT-2626 2012-09-11 15:51:16 +03:00
Natalia.Ukhorskaya 199f10034b KT-2744 Unneeded error message when the only super type is not resolved
#KT-2744 Fixed
2012-09-11 15:17:13 +04:00
Svetlana Isakova 8c87d31212 change signature of 'resolveStandardLibrarySymbol' 2012-09-10 20:27:44 +04:00
Svetlana Isakova c03190910c test change
returned check for unimported reference to test
2012-09-10 20:15:20 +04:00
Svetlana Isakova b2b3d6273e improved test 2012-09-10 20:15:20 +04:00
Svetlana Isakova 2c118084d1 extracted method 'getInnerClassByName' 2012-09-10 20:15:20 +04:00
Svetlana Isakova 1d63ed4db5 double quote(') in DefaultErrorMessages
to make the message the right argument for MessageFormat
2012-09-10 20:15:19 +04:00
Svetlana Isakova f987aa4faa removed JLang and LUtil from file named in stdlib 2012-09-10 20:15:19 +04:00
Svetlana Isakova 5e18ba9241 removed extensions toMutableList/Collection/Set from stdlib 2012-09-10 20:15:19 +04:00
Alex Tkachman b343602f0e reformat code & optimize import 2012-09-10 15:54:16 +03:00
Andrey Breslav 4fc4a11fa2 Adding TuplesCode to kotlin-jslib.jar 2012-09-10 11:56:02 +04:00
Andrey Breslav ddaa6159bf Formatting 2012-09-10 11:19:46 +04:00
Alex Tkachman 53f145b533 optimization of delegates by val property 2012-09-08 09:34:02 +03:00
Andrey Breslav b4746ff53c Avoid having foo.kt.jet in error messages 2012-09-08 00:39:58 +04:00
Andrey Breslav d5f341aa91 Fix most of JS back-end tests after adding Pair and Triple 2012-09-08 00:39:36 +04:00
Svetlana Isakova c12fd3f0e6 Changed Tuple usage to Pair usage in kdoc 2012-09-08 00:35:05 +04:00
Svetlana Isakova 47b3d4edd4 collections changed to mutable in kdoc 2012-09-08 00:33:51 +04:00
Svetlana Isakova e059f8b650 removed imports of java mapped classes
in tools code
2012-09-07 23:36:09 +04:00
Andrey Breslav 89fd0526cf TupleN classes and their usages replaced by Pair and Triple
(KT-2358 Drop tuples)

 #KT-2358 In Progress
2012-09-07 21:26:42 +04:00
Andrey Breslav 8333448f10 Pair and Triple classes added 2012-09-07 21:26:12 +04:00
Andrey Breslav 57e63a8529 Any.hashCode() and Any?.hasCodeOrDefault(Int) added to standard library 2012-09-07 21:26:12 +04:00
Nikolay Krasko df76d2d3a8 In and Out keyword completion for generic parameters 2012-09-07 21:02:01 +04:00
Nikolay Krasko e043a6c699 Fix error keyword completion in modifier lists in parameters 2012-09-07 21:02:00 +04:00
Nikolay Krasko 4f72cd2fee Refactor - subclass PositionElementFilter and don't implement isClassAcceptable 2012-09-07 21:01:59 +04:00
Nikolay Krasko 8fd52a9095 Two tests for resolved reference 2012-09-07 21:01:59 +04:00
Nikolay Krasko 4376c7a87c Use separate test methods instead of generated suit 2012-09-07 21:01:57 +04:00
Svetlana Isakova cd5521d6dc rename error 2012-09-07 19:03:07 +04:00
Svetlana Isakova 1dfe212844 minor 2012-09-07 19:03:06 +04:00
Svetlana Isakova 7c0bebe631 make parameter moduleConfiguration @NotNull
(in 'processImportReference')
2012-09-07 19:03:06 +04:00
Svetlana Isakova 1760d56017 removed unnecessary more util method 2012-09-07 19:03:06 +04:00
Svetlana Isakova 3bd79fa701 introduced interface PlatformToKotlinClassMap
changed method in ModuleConfiguration (now it returns PlatformToKotlinClassMap)
JavaToKotlinTypesMap implements PlatformToKotlinClassMap
'importAllUnderDeclaration' in Importer uses PlatformToKotlinClassMap
2012-09-07 19:03:06 +04:00
Alexander Udalov c0dc1e6742 NamespaceComparator now serializes kind, if it's not DECLARATION.
Lots of test data changed to include members' kinds.
2012-09-07 19:00:08 +04:00
Alexander Udalov cb13995057 Write callable member's kind to JetMethod annotation
Reuse deprecated kind() parameter in JetMethod annotation to store
CallableMemberDescriptor.Kind if it's not DECLARATION.

JavaDescriptorResolver doesn't always resolve members to DECLARATION
anymore, instead it deserializes member's kind from the annotation.

Create DescriptorKindUtils to convert Kind to int value and back.
2012-09-07 19:00:07 +04:00
Alexander Udalov 8a33d390a2 Change newHashSet() to newLinkedHashSet()
This helps in debugging blinking tests, where the outcome is dependent on
the order of elements in a Set
2012-09-07 19:00:06 +04:00
Alexander Udalov 9fc208cfad Support data class componentN functions in lazy resolve
Lazy resolve LoadKotlin test class regenerated.
No new diagnostic tests (run lazy resolve diagnostic test generator for
this purpose).

 #KT-2628 Fixed
2012-09-07 19:00:06 +04:00
Alexander Udalov 67211fde40 Check componentN functions for overload conflicts 2012-09-07 19:00:05 +04:00
Alexander Udalov fbeaaf5fbb Check componentN functions for override conflicts
Check if newly generated component functions happen to override something
which they're not supposed to.
Create new slice to store mapping from annotation descriptors to
corresponding PSI elements, which is used by override checker to report
errors in data classes on.
2012-09-07 19:00:04 +04:00
Alexander Udalov c29312043c Refactor OverrideResolver.checkOverrideForMember()
Create CheckOverrideReportStrategy interface to report override errors
(will be used later for synthesized members override checks).

Add diagnostic test on OVERRIDING_FINAL_MEMBER, as no such test happened
to exist before.
2012-09-07 19:00:04 +04:00
Alexander Udalov 2aadfa47ee Write typeinfo annotations of generated componentN methods
Add some LoadKotlin testcases to test that.
2012-09-07 19:00:03 +04:00
Alexander Udalov 2c84389a45 Codegen for "componentN" functions for data classes 2012-09-07 19:00:02 +04:00
Alexander Udalov b93db69a24 Resolve "componentN" functions for data classes
Reuse existing (but not used) VALUE_PARAMETER_AS_PROPERTY in
BindingContext to store mapping from constructor's value parameters to
property descriptors.

Create a new slice DATA_CLASS_COMPONENT_FUNCTION to store mapping from
constructor's value parameters to generated componentN functions.
2012-09-07 19:00:01 +04:00
Alexander Udalov 410922c58d CallableMemberDescriptor.Kind.SYNTHESIZED
Introduce CallableMemberDescriptor.Kind.SYNTHESIZED for members which
neither are declared nor do appear as overrides of anything, but rather
are generated by the compiler.
2012-09-07 19:00:01 +04:00
Alexander Udalov 95dddadb36 Present "data" annotation to standard library 2012-09-07 19:00:00 +04:00
Andrey Breslav b46187a560 KT-2739 Error type inferred for hashSet(Pair, Pair, Pair)
#KT-2739 Fixed
2012-09-07 18:24:22 +04:00
Alexander Udalov 213157a3c5 Regenerate diagnostic tests 2012-09-07 17:58:03 +04:00
Evgeny Gerashchenko 60eeee643a EA-37462 - AIOOBE: ResolveToolwindow.renderValueArguments
Added assertion with extra information.
2012-09-07 17:52:32 +04:00
Evgeny Gerashchenko 1b2d946246 EA-35698 - assert: DecompiledDataFactory.build
Added information to assert message.
2012-09-07 17:52:32 +04:00
Evgeny Gerashchenko 0cb69d0328 Minor. 2012-09-07 17:52:32 +04:00
Evgeny Gerashchenko 17932f1b7c EA-36257 - NPE: DecompiledDataFactory.appendDescriptor
Added assert in only place where source of NPE may appear.
2012-09-07 17:52:32 +04:00