Alexander Udalov
e8a8bdc58e
Add test on cyclicly dependent Java 9 modules
2017-07-06 13:01:12 +03:00
Alexander Udalov
9199023952
Improve automatic module handling in module graph construction
...
Add all automatic modules to roots if at least one automatic module is
added, as per
http://cr.openjdk.java.net/~mr/jigsaw/spec/api/java/lang/module/package-summary.html
2017-07-06 13:01:12 +03:00
Alexander Udalov
c428505d4d
Load automatic module names correctly
...
Load the Automatic-Module-Name manifest entry value if it's present (see
http://mail.openjdk.java.net/pipermail/jpms-spec-observers/2017-May/000877.html ),
otherwise sanitize the name of the .jar file, throwing out all chars
except alphanumeric, duplicate dots and a version qualifier
2017-07-06 12:50:05 +03:00
Alexander Udalov
612e64d8e3
Load module-info.class from multi-release jars' META-INF/versions/
2017-07-06 12:50:04 +03:00
Alexander Udalov
5b9ee88b52
Remove --add-opens options to workaround Java 9 visibility checks
...
These options are no longer needed because the problematic code in
intellij-core that was accessing these private APIs has been dealt with
in the 171 branch.
The remaining options in "Codegen Tests" run configurations are needed
because of reflection usage on JDK internals in KtUsefulTestCase
2017-07-06 12:50:04 +03:00
Alexander Udalov
40d4eeab4f
Do not try to load jrt file system from JDK version < 9
...
The FileSystems.newFileSystem call failed if the compiler was being run
on Java 9 with -jdk-home $JDK_16
2017-07-06 12:50:03 +03:00
Alexander Udalov
0f4684da67
Fix codegen tests on JDK 9 with jdkKind = FULL_JDK
2017-07-06 11:58:03 +03:00
Alexey Andreev
4bd9866975
Remove unnecessary overriding methods, fix compilation
2017-07-06 10:34:05 +03:00
Alexey Andreev
ca63717124
Multiple fixes of JS source maps
...
- elvis expression with complex RHS
- destructuring declarations
- decomposition of `var` statement (for example, in case of
inline destructuring functions)
- `is` LHS &&/|| inline fun RHS
- argument assignment to temporary var on inline call site
- assignment of `next()` result to temporary var in `for` expression
- rethrow statement in exception handler
2017-07-06 10:20:49 +03:00
Alexey Andreev
f873834529
Fix JS source maps for objects and enums
2017-07-06 10:20:49 +03:00
Alexey Andreev
d8fe7e55db
Fix JS source maps for lambdas with captured variables
2017-07-06 10:20:48 +03:00
Alexey Andreev
ec2a5bf0ee
Fix JS source map for char boxing and unboxing
2017-07-06 10:20:47 +03:00
Alexey Andreev
be7f3a787c
Fix JS source maps for when expression
2017-07-06 10:20:46 +03:00
Alexey Andreev
d613124cb1
Generate JS source maps for temporary vars declarations and definitions
2017-07-06 10:20:46 +03:00
Alexey Andreev
64f335380f
Provide more source map info about statements in JS tests
2017-07-06 10:20:45 +03:00
Alexey Andreev
fa95f78e78
Generate JS source map for if statement got from optional argument
2017-07-06 10:20:44 +03:00
Alexey Andreev
1e74325c52
Generated source map for JS function's closing curly bracket
2017-07-06 10:20:44 +03:00
Alexey Andreev
4e18ea2d04
Fix JS source map of decomposed conditional expression
2017-07-06 10:20:43 +03:00
Alexey Andreev
b5218915f8
Fix associativity of generated comma operator in JS BE
2017-07-06 10:20:42 +03:00
Alexey Andreev
2122f57f51
Don't merge locations in JS source map test cases
...
Don't merge locations of containing if/while/do..while/for
statements with locations of conditions
2017-07-06 10:20:42 +03:00
Alexey Andreev
dea73ebecf
Refactor generator of JS source map
...
- refactor pipeline for generation of source map
- generate "empty" mappings for nodes that impossible
to map to something reasonable
- generate more accurate locations in source maps for specific
JS AST nodes
- for binary operation nodes parser now returns location
of binary operator tokens instead of location of first operand
- change completely how source map remapper works
2017-07-06 10:20:41 +03:00
Nikolay Krasko
6a2f3d8065
Minor: remove let usage
2017-07-05 20:21:13 +03:00
Nikolay Krasko
72611d1337
Fix extract refactoring for android extensions declarations (KT-11048)
...
Allow any target declarations in marking references. Otherwise conflicts
for references resolved to xml are not considered broken.
This also fix evaluate for extension fields.
#KT-11048 Fixed
2017-07-05 20:21:13 +03:00
Mikhail Glukhikh
a09b31b568
Classify all Kotlin inspections
2017-07-05 16:00:22 +03:00
Mikhael Bogdanov
2808e45b89
Enable test in js, native
2017-07-05 11:15:38 +02:00
Alexander Udalov
d97fa604e1
Write metadata for suspend function into anonymous coroutine classes
...
To render nice Kotlin types in toString() of continuation
2017-07-04 19:41:48 +03:00
Alexander Udalov
5a8546519a
Do not fail on lambdas without metadata in toString()
2017-07-04 19:41:47 +03:00
Vladimir Koshelev
61e52f0bfe
Improve a reported message if -jdk-home path does not exist.
...
Fix KT-18794
2017-07-04 19:40:42 +03:00
Alexey Sedunov
994b6d687c
Find Usages: Use MethodReferencesSearch to find constructor usages
2017-07-04 19:37:55 +03:00
Alexey Sedunov
28c5978d81
Light Classes: Fix AIOOBE on KtParameter -> PsiParameter conversion
...
EA-88058 Fixed
2017-07-04 19:37:54 +03:00
Alexey Sedunov
d69caea725
Kotlin Facet: Ignore modules unprocessed by kotlin project resolver
...
This happens in AS on project opening, but we can't (re-)configure facet
in such case since relevant module data are not available
#KT-18725 Fixed
2017-07-04 19:37:53 +03:00
Alexey Sedunov
ee200c87ea
Kotlin Facet: Change module JDK according to jdkHome
...
It's possible when JDK with the same home path is already configured
2017-07-04 19:37:52 +03:00
Alexey Sedunov
2a53043fef
Generate equals/hashCode(): Fix function body generation
...
#KT-18596 Fixed
2017-07-04 19:37:50 +03:00
Simon Ogorodnik
33c22b8251
KT-8208: Support static members completion when receiver not-imported
...
#KT-8208 fixed
2017-07-04 16:41:50 +03:00
Dmitry Petrov
16505daeea
Fix 'equals' for NotNullBasicValue
...
NotNullBasicValues were merged incorrectly sometimes,
which caused problems with INSTANCEOF checks.
#KT-18779 Fixed
2017-07-04 12:19:10 +03:00
Mikhael Bogdanov
8121c1d3c4
Update test to support js-backend
2017-07-04 10:12:42 +02:00
Mikhael Bogdanov
8666b95dd2
Delete local variables on default mask expantion
...
#KT-18792 Fixed
2017-07-03 17:01:06 +02:00
Mikhael Bogdanov
01e2f8e32c
Preventively allocate slots for additional default parameters
...
Otherwise they are corrupted by inline
2017-07-03 17:01:06 +02:00
Denis Zharkov
5453f3067c
Load @NonNull(when=UNKNOWN) annotated type as a flexible one
2017-07-03 17:55:37 +03:00
Denis Zharkov
55b585f3d0
Replace JavaTypeAttributes interface with simple data class
2017-07-03 17:55:37 +03:00
Denis Zharkov
939bacc810
Minor. Drop unused parameters in LazyJavaScope
2017-07-03 17:55:37 +03:00
Denis Zharkov
e26c210d69
Support TypeQualifierDefault from JSR 305 for nullability qualifiers
...
#KT-10942 Fixed
2017-07-03 17:55:37 +03:00
Denis Zharkov
5141a88a53
Add TypeQualifier annotation to IDE test data
...
Othewise nullability is not processed correctly
2017-07-03 17:55:37 +03:00
Denis Zharkov
a95d3e601b
Fix container for extension receiver types from Java
...
No tests are added since there are some already
(e.g. TypeEnhancement.testOverriddenExtensions)
2017-07-03 17:55:37 +03:00
Denis Zharkov
57b7b91444
Do not add container annotaions to type artificially
...
It was only used for type-related nullability/mutability
annotations and it was necessary to remove them
in the descriptor renderer (duplicating their fqnames there).
At the same time they're only needed for types enhancement
where they can be simply restored from type owners' descriptors
The testData changes are more or less correct: this kind of annotations
is bound both to types themselves and their use because of their targets
2017-07-03 17:55:37 +03:00
Denis Zharkov
f877c82029
Simplify computeIndexedQualifiersForOverride() declaration
...
Do not pass properties of the to its own methods
2017-07-03 17:55:37 +03:00
Denis Zharkov
8812844d43
Move type qualifiers calculation into SignatureParts
...
It helps not to pass signature parts content to them
2017-07-03 17:55:37 +03:00
Denis Zharkov
92f9194112
Support TypeQualifierNickname for nullability annotations
...
#KT-10942 In Progress
2017-07-03 17:55:37 +03:00
Denis Zharkov
f2a55d590c
Move type qualifiers extraction to SignatureEnhancement
...
These methods will depend on other components soon
2017-07-03 17:55:37 +03:00
Denis Zharkov
b3caa1da34
Introduce SignatureEnhancement component
...
It will depend on the AnnotationTypeQualifierResolver later
2017-07-03 17:55:37 +03:00