Commit Graph

10156 Commits

Author SHA1 Message Date
Andrey Breslav f36d6ce5b2 Reporting USELESS_ELVIS and UNNECESSARY_NOT_NULL_ASSERTION on Java's @NotNull values 2015-02-10 06:55:48 +01:00
Andrey Breslav 30f5c1b953 Reporting unnecessary safe calls on Java's @NotNull values 2015-02-10 06:55:48 +01:00
Andrey Breslav 1d4109aec1 Retaining annotations on Java array types 2015-02-10 06:55:48 +01:00
Andrey Breslav fc3cd20456 Minor. Formatting fixed 2015-02-10 06:55:47 +01:00
Andrey Breslav fcac449c70 Nullability-related warnings for receivers
#KT-6723 In Progress
2015-02-10 06:55:47 +01:00
Andrey Breslav 5db6bb04e3 Basic Java nullability warnings implemented
#KT-6723 In Progress
2015-02-10 06:55:47 +01:00
Andrey Breslav 29d24374d6 Type approximation factored out as an additional checker 2015-02-10 06:55:47 +01:00
Andrey Breslav a35c6b1566 AdditionalTypeCheckers introduced to factor out approximation logic later 2015-02-10 06:55:46 +01:00
Andrey Breslav 82ace2b251 ResolutionContext used always for checkType() 2015-02-10 06:55:46 +01:00
Andrey Breslav 0e972acf8c == turned into a safe-call 2015-02-10 06:55:46 +01:00
Alexander Udalov 560b2346a6 Fix ScriptTest, use full JDK instead of mock
Mock JDK has an incomplete hierarchy (OutputStream -> Flushable) and this is
relevant in ScriptTest because it collects all compiler output messages
2015-02-10 00:34:18 +03:00
Alexander Udalov 6763d61aae Minor, fix warning, don't create empty map 2015-02-09 21:14:03 +03:00
Alexander Udalov a6ac56ae5a Sort source files in JetCoreEnvironment
Is supposed to help make error situations more deterministic
2015-02-09 21:14:03 +03:00
Alexander Udalov 339a38b69b Minor, use module.resolveTopLevelClass() utility 2015-02-09 21:14:03 +03:00
Alexander Udalov 192e69e90b Minor, add toString() to JavaElementFinder.FindClassesRequest 2015-02-09 21:14:03 +03:00
Alexander Udalov 4128655893 Report incomplete hierarchy error
This is the case when you reference a Java class in Kotlin whose superclass is
not resolved. Previously this fact was swallowed by LazyJavaClassDescriptor
leading to mysterious compilation errors

 #KT-5129 Fixed
2015-02-09 21:14:02 +03:00
Alexander Udalov 28d8c8906a Use module instead of trace in light class search
Fixes weird and infrequent compilation errors in KotlinLightClassForPackage.kt
2015-02-09 21:14:02 +03:00
Dmitry Jemerov 246cce0502 Merge pull request #569 from yole/kdoclinkparser-npe
fix NPE in KDocLinkParser
2015-02-09 18:38:15 +01:00
Dmitry Jemerov 084470e840 fix NPE in KDocLinkParser 2015-02-09 18:21:50 +01:00
Alexander Udalov ebed59e26a Fix temporary workaround: bridge was not generated 2015-02-09 19:23:19 +03:00
Valentin Kipyatkov 33f979768d More elegant shortening of user type 2015-02-09 12:56:00 +03:00
Valentin Kipyatkov ef8be9560a Import insertion helper is not confused by inaccessible classes + check visibility of imported declarations through PackageViewDescriptor instead of PackageFragmentDescriptor 2015-02-09 12:55:59 +03:00
Valentin Kipyatkov 02e63196f8 Performance optimization 2015-02-09 12:55:21 +03:00
Alexander Udalov 720942b05f Temporary workaround for compilation errors in KotlinLightClassForPackage 2015-02-09 12:41:59 +03:00
Nikolay Krasko 6f6a65cb8d Convert to LinkedHashSet 2015-02-06 23:53:17 +03:00
Nikolay Krasko 9173c59969 Fix deprecated warning 2015-02-06 23:53:16 +03:00
Nikolay Krasko de22bfbde9 Refactoring: extract method createFakeClsFile 2015-02-06 23:53:16 +03:00
Nikolay Krasko 8dd910bd36 Convert to Kotlin KotlinLightClassForPackage: fixes for j2k converter 2015-02-06 23:53:15 +03:00
Nikolay Krasko a4e2c3b6fa Convert to Kotlin KotlinLightClassForPackage: j2k converter 2015-02-06 23:53:14 +03:00
Nikolay Krasko 082ac7a05f Convert to Kotlin KotlinLightClassForPackage: file rename 2015-02-06 23:53:13 +03:00
Nikolay Krasko c9c3a1c924 Get containing with deferred stub evaluation
Tested in org.jetbrains.kotlin.idea.quickfix.QuickFixMultiFileTestGenerated.CreateFromUsage.CreateVariable.Parameter#testPlatformType
Resolve of Java element triggers resolve for all classes in package in IDE. One of them is Kotlin light class for package. In case when
some declarations in that packages has references to Java class from current package, compiler goes to recursion.
2015-02-06 23:53:12 +03:00
Dmitry Jemerov c366da95ac move KDocFinder to plugin because it's not used in compiler; wrap it in an object to avoid package facade conflicts; add test to findKDoc() and fix it so that it actually works 2015-02-06 18:13:35 +01:00
Dmitry Jemerov fdfb843fdc add @sample known tag; handle @constructor tag in findKDoc() 2015-02-06 16:58:36 +01:00
Dmitry Jemerov 70cf3e9c60 KDoc link parsing rewrite.
Support qualified names immediately after tag (@see or @param). Detect whether a tag is followed by a reference immediately while lexing, remove TEXT_OR_LINK token type. Remove duplicate nested KDocLink nodes from the PSI structure.
2015-02-06 16:33:55 +01:00
Dmitry Jemerov cc5edc332d inherit documentation for properties as well as functions 2015-02-06 16:32:41 +01:00
Evgeny Gerashchenko e5fd6bc067 Minor. Inlined trivial functions. 2015-02-06 17:44:42 +03:00
Evgeny Gerashchenko 5b89f88447 Minor. Simplified getObsoletePackageParts() and similar functions. 2015-02-06 17:44:40 +03:00
Evgeny Gerashchenko f071802e19 Simplified process of filtering out obsolete package parts and loading descriptors from incremental caches.
Now when file is deleted or dirty (compiled right now), its old package part is used. Current package of file doesn't matter.
2015-02-06 17:44:39 +03:00
Evgeny Gerashchenko 5663383fea Minor. Removed unused property. 2015-02-06 15:56:33 +03:00
Alexey Sedunov 03e076aba3 Intentions: function <-> property conversion 2015-02-05 23:12:38 +03:00
Dmitry Jemerov 49cecc35fd completion in kdoc 2015-02-05 18:30:02 +01:00
Dmitry Jemerov 56d85c2033 don't parse links which aren't Kotlin identifiers and have an explicitly specified destination 2015-02-05 16:27:37 +01:00
Alexey Sedunov 11b60f6604 Light Classes: Delegate getUseScope() to original elements
#KT-6699 Fixed
2015-02-04 23:38:18 +03:00
Dmitry Jemerov 3253754395 code review 2015-02-04 17:26:48 +01:00
Dmitry Jemerov c0e7d1faf2 add references to kdoc; support resolve and rename 2015-02-04 17:26:47 +01:00
Dmitry Jemerov 40f459306a parse qualified names in kdoc 2015-02-04 17:26:46 +01:00
Dmitry Jemerov 223882d292 correctly parse tag in the beginning of doc comment 2015-02-04 17:26:46 +01:00
Alexander Udalov 1c87464695 Change properties to methods in light class hierarchy
There's a Kotlin-Java-Kotlin hierarchy with an abstract property in a
superclass and its implementation (as a get-method) in the Java subclass, which
caused problems because Kotlin subclass can't have both (different symbols,
same JVM signatures)
2015-02-04 14:57:49 +03:00
Alexander Udalov cafc1ea24d Fix resolution of inherited Kotlin properties in Java classes
#KT-6720 Fixed
2015-02-04 14:57:47 +03:00
Alexander Udalov 5c2d0c6173 Generate not-null assertions on extension receiver parameters 2015-02-03 21:40:39 +03:00