Commit Graph

35405 Commits

Author SHA1 Message Date
Dmitry Petrov 67fe28b8d8 Combine type annotations for arguments of type aliases. 2016-11-22 10:04:47 +03:00
Dmitry Petrov 063bce23d2 Prohibit constructing projected types via type aliases. 2016-11-22 10:04:47 +03:00
Dmitry Petrov bab9cde280 Type alias projections & substitution rules.
1. Substitution variance (sv) is a substitution composition of type alias argument variance (av)
and corresponding expanding type argument variance (ev):
sv =
  | av == ev -> av
  | av == INVARIANT -> ev
  | ev == INVARIANT -> av
  | else -> (variance conflict error; av)

2. Resulting variance (rv) is a type argument composition of sv and type parameter variance (pv):
rv =
  | sv == tv => INVARIANT
  | sv == INVARIANT => INVARIANT
  | tv == INVARIANT => sv
  | else -> (variance conflict error; sv)
2016-11-22 10:04:47 +03:00
Ilya Gorbunov 427c6386a9 Remove java.lang from default imports in JS target platform 2016-11-21 18:22:05 +03:00
Ilya Gorbunov 8b77430af4 Remove java.util package from js decompiler tests 2016-11-21 18:20:33 +03:00
Ilya Gorbunov 49756a897e Just refactor tests that require further investigation 2016-11-21 18:20:33 +03:00
Ilya Gorbunov 62fe89b536 Make several tests running on JS backend. 2016-11-21 18:20:33 +03:00
Ilya Gorbunov 0899a0fdda Make some tests JVM only 2016-11-21 18:20:33 +03:00
Ilya Gorbunov 38840bb529 Do not reference java.util in tests that run on JS backend. 2016-11-21 18:20:33 +03:00
Ilya Gorbunov 491ca582b3 Include collection type aliases into mock-runtime as they are used extremely often in tests 2016-11-21 18:20:33 +03:00
Ilya Gorbunov 6a70761783 Minor: normalize '@Test' annotation casing in all tests. 2016-11-21 18:20:33 +03:00
Ilya Gorbunov 50cd620f92 Remove java.util.* imports from common code. 2016-11-21 18:20:33 +03:00
Ilya Gorbunov b4fbedbc9e Update selenium to 2.52.0 to fix strange behavior in one of js tests.
This selenium requires jre7 to run.
2016-11-21 17:27:11 +03:00
Vyacheslav Gerasimov 60bc35b787 Implemented suppress lint intention action for android lint (KT-12020)
#KT-12020 Fixed
2016-11-21 17:16:27 +03:00
Dmitry Jemerov 6a8f78d7c1 Don't add script files to facade indices
#KT-12445 Fixed
2016-11-21 14:35:00 +01:00
Anton Bannykh 2bec54924f Android tests: use directives from tests-common to determine if the test is supposed to pass on JVM (adds support for IGNORE_BACKEND and IGNORE_BACKEND_WItHOUT_CHECK" directives). 2016-11-21 14:06:29 +03:00
Alexey Andreev 85a775375a JS: when deciding whether inner class of a local class captures this, don't check for subtyping, since frontend generates strict classes in descriptors. Remove fix for #KT-13583, since it's no more needed. Fix #KT-13792 2016-11-21 12:57:59 +03:00
Alexey Andreev 0a240b2a3a KT-12976: add code to generated JS modules that detects wrong module order and produces human-friendly error message. Fix #KT-12976 2016-11-21 12:57:11 +03:00
Dmitry Petrov d665193c20 Type alias constructors for inner classes in expressions ans supertype lists. 2016-11-21 10:25:51 +03:00
Dmitry Petrov 9ac3dbceca Prohibit nested & local type aliases in 1.1: don't suggest to introduce typealias in a class or a function. 2016-11-21 10:25:51 +03:00
Dmitry Petrov 4c47d77a9f Report error on non-top-level type aliases (unsupported in 1.1).
Get rid of nested type aliases in project.
2016-11-21 10:25:51 +03:00
Ilya Gorbunov 87c9d4e84e Introduce unsafeCast function. Provide more JS-idiomatic emptyArray() implementation.
#KT-14034 Fixed
2016-11-19 03:37:47 +03:00
Alexey Tsvetkov 18d50b930d Minor: add Throws(Exception) to avoid override issues in java 2016-11-18 23:17:34 +03:00
Alexey Tsvetkov ea93ec3eec Ensure jps caches are always cleared in tests 2016-11-18 23:17:30 +03:00
Alexey Tsvetkov 72fdb77628 Minor: fix js runtime error in gradle test 2016-11-18 23:06:45 +03:00
Alexey Tsvetkov 94b0f3839e Minor: set apiVersion equal to languageVersion in gradle test 2016-11-18 23:06:45 +03:00
Alexey Tsvetkov c15e878808 Minor: remove inner type alias from gradle test 2016-11-18 23:06:45 +03:00
Alexey Tsvetkov f70ba8b18d Gradle: run k2js out-of-process if Gradle >= 3.2 is used 2016-11-18 23:06:45 +03:00
Alexey Tsvetkov 38445aca8f Gradle: use builtins workaround only when Gradle >= 3.2 is used 2016-11-18 23:06:45 +03:00
Alexey Tsvetkov df910a7801 Gradle: load builtins from dependencies
#KT-14798 Fixed
2016-11-18 23:06:45 +03:00
Anton Bannykh 68b35aa0ac JS inliner: Don't treat 'bar' as unused in the presence of 'bar.call' expressions 2016-11-18 20:55:07 +03:00
Ilya Gorbunov b7b320e4ce @JvmOverloads-generated overloads of final methods are also final: update public API tests. 2016-11-18 19:53:24 +03:00
Ilya Gorbunov 1defc10add Minor fix: pass message to superconstructor of NoSuchElementException 2016-11-18 19:12:05 +03:00
Ilya Gorbunov ac2c2aa959 Remove collectionsMax once again. 2016-11-18 19:12:05 +03:00
Ilya Gorbunov 0dbaf2a605 Make toTypedArray reified again and thus inline, rewrite copyToArray and copyToArrayImpl in kotlin. 2016-11-18 19:12:05 +03:00
Ilya Gorbunov 698bc7bd31 Internal visiblity for hacks.kt declarations.
Explicit public visibility.
2016-11-18 19:12:05 +03:00
Zalim Bashorov 4374d353ba IDE: don't exclude external system libraries (e.g. from gradle) when getting library version in facetUtils 2016-11-18 17:18:16 +03:00
Dmitry Jemerov 5a533a521b Don't consider a directory to be a package if there's a .java or .class file with the same name in its parent directory
#KT-12664 Fixed
2016-11-18 14:00:44 +01:00
Zalim Bashorov 7dbcbeb794 IDE: fix detecting target platform for module when it contains js stdlib without regular name
Don't use fixed library name to detect JS stdlib.
2016-11-18 15:57:46 +03:00
Anton Bannykh 2f0bccfb09 JS: chained reified function calls (KT-12527) fixed 2016-11-18 13:48:16 +03:00
Dmitry Jemerov a57748f4f4 @JvmOverloads-generated overloads of final methods are also final; test to verify that overloads of deprecated methods are deprecated 2016-11-18 11:05:03 +01:00
Dmitry Jemerov b8525de726 Disallow @JvmOverloads on any interface methods
#KT-12224 Fixed
2016-11-18 11:05:02 +01:00
Dmitry Jemerov 79e90b32e8 @JvmOverloads on local declarations is now an error 2016-11-18 11:05:01 +01:00
Dmitry Jemerov 140c7351a8 Add quickfix for incorrect @JvmOverloads annotation
#KT-12701 Fixed
2016-11-18 11:05:00 +01:00
Dmitry Jemerov 12e4cf9a4f Report @JvmOverloads errors on annotation, not on entire declaration (KT-12701) 2016-11-18 11:05:00 +01:00
Dmitry Jemerov d3ccbe8172 Generate correct varargs flag for @JvmOverloads-generated methods
#KT-14186 Fixed
2016-11-18 11:04:59 +01:00
Dmitry Jemerov 16a133bf5c Generate default constructor also for private classes when all parameters have default values
#KT-14408 Fixed
2016-11-18 11:04:51 +01:00
Dmitry Jemerov 248185943c Handle @JvmOverloads on inner class constructors correctly
#KT-14678 Fixed
2016-11-18 11:04:49 +01:00
Dmitry Petrov 8b99141030 KT-14839 Do not coerce after remapped variable store. 2016-11-18 09:35:31 +03:00
Mikhail Zarechenskiy 4b23c50bf8 Parse expressions like '1._foo()' after dot as references 2016-11-17 22:58:40 +03:00