Commit Graph

22167 Commits

Author SHA1 Message Date
Mikhail Glukhikh bae92f3a33 Sealed class: handle the case with actual type alias #KT-26141 Fixed
Before this commit, class super-type could be sealed only in the case
it's the class we are inside or in the same file with.
However, it's quite possible for the expect sealed class
to be implemented by typealias.
So in this commit we allow class super-type to be sealed
if it's typealias expansion we are inside.
2018-09-05 13:25:49 +03:00
Mikhail Glukhikh 56d89266d4 Add tests for KT-26141 (yet without changes) 2018-09-05 13:10:03 +03:00
Mikhail Glukhikh 53e7778078 Add modifiers on the same line even after annotation #KT-26492 Fixed 2018-09-05 13:05:08 +03:00
Mikhail Glukhikh 4dd95e5640 Introduce OptionalExpectationInspection
It works at INFORMATION level only and is intended to form quick-fixes
to add relevant actual declarations.

#KT-25533 Fixed
2018-09-05 13:05:07 +03:00
Dmitry Petrov db13ab59a6 Test: SuccessOrFailure calls don't generate erased class references 2018-09-05 12:20:57 +03:00
Dmitry Petrov 203fd6a5d6 Make inline class wrapper constructor synthetic 2018-09-05 12:20:57 +03:00
Dmitry Petrov 85826d304e Don't generate secondary constructors for inline class wrapper 2018-09-05 12:20:57 +03:00
Dmitry Petrov 65881dda97 Fix tests after rebase 2018-09-05 12:20:57 +03:00
Dmitry Petrov 1bf8cfca8b Test: property accessors are called by inline class 2018-09-05 12:20:57 +03:00
Dmitry Petrov a2900282fd Call factory method for primary constructors of inner classes
We might want to add 'init' blocks later, so now, for the sake of
binary compatibility with 1.3-RC binaries, we have to generate these
'constructor' calls.

Note that in some tests inline class boxing is no longer redundant,
because resulting value is passed to 'constructor' as an argument.
2018-09-05 12:20:57 +03:00
Dmitry Petrov b1016936b2 'box'/'unbox' methods are called by inline class 2018-09-05 12:20:57 +03:00
Dmitry Petrov 580b782585 Simplify code, make $Erased class package private 2018-09-05 12:20:57 +03:00
Dmitry Petrov 687b492bf9 Test: inline class secondary constructors are called by inline class 2018-09-05 12:20:57 +03:00
Dmitry Petrov 05daa21657 Fix inline class secondary constructor call generation
Don't generate NEW+DUP for inline class constructor calls.
2018-09-05 12:20:57 +03:00
Dmitry Petrov 80a67477db Generate method calls for inline classes through IC, not IC$Erased
IC extends IC$Erased, so it should be fine.
2018-09-05 12:20:57 +03:00
Dmitry Petrov 3080b65f7d Inline (wrapper) class IC extends erased inline class IC$Erased 2018-09-05 12:20:57 +03:00
Sergey Bogolepov a46b28718e Add allScopes property to IrElementVisitorVoidWithContext 2018-09-05 09:56:48 +03:00
Svyatoslav Scherbina 66b259350a Support implicit integer coercion enabling for the entire module 2018-09-05 09:56:47 +03:00
Ilmir Usmanov cfc10ec061 Simplify debug metadata: instead of array of same values, store single element
This change is valid, since we want StackTraceElement to be as close
as possible to StackTraceElement of non-coroutine code.
Particularly, if the line is inside inlined function, its className,
functionName and sourceFile are inline site's ones, but lineNumber
is large, which is the way of representing inline function's line
numbers. The rest is handled by the plugin, which allows the user to choose
between inline function body and inline site.
2018-09-04 22:20:08 +03:00
Svyatoslav Kuzmich ad58fdd158 [JS IR BE] Unmute tests after adding stdlib 2018-09-04 20:19:04 +03:00
Svyatoslav Kuzmich 97717afec4 [JS IR BE] Choose actual declaration of COROUTINE_SUSPEND_NAME 2018-09-04 20:19:04 +03:00
Svyatoslav Kuzmich 5192783669 [JS IR BE] Workaround empty blocks in state machine builder 2018-09-04 20:19:03 +03:00
Svyatoslav Kuzmich e0237a4480 [JS IR BE] Check for unbound symbols in type operator lowering 2018-09-04 20:19:03 +03:00
Svyatoslav Kuzmich 437a68daca [JS IR BE] Check number of value arguments in toString 2018-09-04 20:19:03 +03:00
Svyatoslav Kuzmich a3afd101fa [JS IR BE] Delete expected enum classes 2018-09-04 20:19:03 +03:00
Svyatoslav Kuzmich dde1e9335e [JS IR BE] Don't copy type parameters in secondary ctor lowering 2018-09-04 20:19:03 +03:00
victor.petukhov 921fc263e1 Remove PSI spec tests generation 2018-09-04 15:54:04 +03:00
Roman Artemev 0eba87b571 [JS IR BE] Mute temporary broken tests 2018-09-04 12:43:39 +03:00
Roman Artemev 54e98fc014 [JS IR BE] Make coroutine compile separately from stdlib
* use accessors instead of direct field access
2018-09-04 12:43:39 +03:00
Alexander Udalov 4f803d03cf Minor, fix test data 2018-08-31 19:54:08 +02:00
victor.petukhov 110bc7412d Fix name of 'controlflow' folder with contract tests 2018-08-31 17:27:51 +03:00
victor.petukhov d9473c0b6e Add parsing spec tests support 2018-08-31 17:16:19 +03:00
victor.petukhov f322aba768 Add gradle task to generate json tests map 2018-08-31 17:16:10 +03:00
victor.petukhov 88d8bb84ac Add not linked spec tests support in printSpecTestStatistic gradle task 2018-08-31 17:16:00 +03:00
victor.petukhov 8d91e5998d Add spec tests for contracts 2018-08-31 17:15:51 +03:00
victor.petukhov ecf8b88c4c Add 'not linked' kind of spec tests 2018-08-31 17:15:40 +03:00
Georgy Bronnikov 2fccf6875f Mute tests involving Char.{MIN,MAX}_VALUE, analogously to other primitive types 2018-08-31 15:44:05 +03:00
Roman Artemev 8a871b3f0c Update tests 2018-08-31 15:34:18 +03:00
Mikhael Bogdanov e6b8ade096 JVM_IR. Reference fields 2018-08-31 15:34:18 +03:00
Mikhael Bogdanov 92ce50b22c JVM_IR. Cache defaultImpls function declarations 2018-08-31 15:34:18 +03:00
Mikhael Bogdanov 5c0cdac69f JVM_IR. Support generic constructors after "Roll back constructor type parameters" 2018-08-31 15:34:18 +03:00
Roman Artemev 0b926af203 Add KotlinType in WrappedClassDescriptor & WrappedTypeParameterDescriptor 2018-08-31 15:34:18 +03:00
Roman Artemev fec8065fd0 Fix code review
Minor fixes
Fix JVM IR BE
Fix NATIVE
2018-08-31 15:34:18 +03:00
romanart afcdcf8217 Partially reimplement KotlinType based util using IrType 2018-08-31 15:34:18 +03:00
Roman Artemev d1621b80cc Fake wrapped descriptors first working draft
get rid of descriptors in Bridge and Enum lowerings
Replace property accessors function type with IrSimpleFunction because they couldn't be constructors
get rid of descriptors in Callable reference lowering
refactored descriptor factory and inner class lowering
Add isReified property to IrTypeParameter declaration
keep getting rid of descriptors
Get rid of descriptors in Shared Variable Manager
LocalDeclarationLowering also uses no descriptors
Fix psi2ir
Fix nested classes names
Fix outer reference in inner classes
Fix name generator
get rid of descriptors in coroutines - something is working
Fix name generator
Fix unbound symbols in JVM BE
Rename DeclarationFactory members
2018-08-31 15:34:18 +03:00
Mikhail Zarechenskiy daadba0927 Postpone conversions from signed constants to unsigned ones
#KT-26071 Fixed
2018-08-31 15:22:43 +03:00
Ilya Chernikov fd0eb6ee34 Implement support for class literals as annotation arguments...
on deserialization and reflection
2018-08-31 15:17:51 +03:00
Toshiaki Kameyama 53c10238d6 Introduce inspection for safe cast + return #KT-26230 Fixed 2018-08-31 15:03:25 +03:00
Sergey Rostov cdcc588a55 IC: Fix CacheVersionsManager IC flag set.
Previously flag was set before the IncrementalCompilation.isEnabledForJvm() system property was set.
This cases that the cache versions was not saved.
2018-08-31 14:55:35 +03:00
Alexander Udalov 5f18439442 Use correct module name when calling internal members from other module
This is needed to avoid using the same module name for test root as for
the main source root in the Gradle plugin, which is needed to fix
KT-18955
2018-08-31 13:42:57 +02:00