Commit Graph

3467 Commits

Author SHA1 Message Date
Alexey Tsvetkov 5ff5cea17a JS: report error when js() produces empty AST 2015-03-23 16:43:49 +03:00
Alexey Tsvetkov b5797eb15b JS: added tests for recursion cycle in inline functions 2015-03-23 16:43:48 +03:00
Alexander Udalov 7e69a5ac9a Don't create KProperty instance for synthetic field
#KT-5759 Fixed
2015-03-23 16:30:26 +03:00
Alexander Udalov 9cf0720925 Fix KClass.simpleName for local classes 2015-03-23 16:30:24 +03:00
Zalim Bashorov d569ea5974 JS frontend: added diagnostic about secondary constructors not supported yet. 2015-03-23 13:52:56 +03:00
Zalim Bashorov 1b530887cd Minor: fix testdata 2015-03-20 21:23:31 +03:00
Zalim Bashorov aaa7f6d5e4 JS frontend: added diagnostic about non-toplevel classifiers are unsupported yet. 2015-03-20 21:23:31 +03:00
Denis Zharkov eefea26d54 Recovery for initializer if no LBRACE
- If no LBRACE after 'init' keyword parse initializer without body
- Made getBody() nullable, appropriate checks added
2015-03-18 19:59:25 +03:00
Denis Zharkov bd5dbb665e Fix header scope for secondary constructors
Add companion object's scope and nested classes

 #KT-6996 fixed
2015-03-18 19:59:24 +03:00
Michael Bogdanov ed62e4972f Temporary disable smap generation 2015-03-18 19:00:24 +03:00
Michael Bogdanov 6e55ea6480 Skip smap generation if there is no source information
#KT-7022 Fixed
2015-03-18 18:49:18 +03:00
Stanislav Erokhin 43e24f6b0d Fixed test data for new lambda syntax 2015-03-18 16:06:44 +03:00
Stanislav Erokhin 371908a280 Temporary added DEPRECATED_LAMBDA_SYNTAX to tests.
It will be fixed soon.
2015-03-18 16:06:44 +03:00
Stanislav Erokhin 47e8b1e77c Create warning for old lambda syntax. 2015-03-18 16:06:44 +03:00
Stanislav Erokhin c24c3daf54 Allowed shorthand parameter list with type reference in lambda. 2015-03-18 16:06:44 +03:00
Stanislav Erokhin 7a8341d0f1 Added parser test for function with initializer. 2015-03-18 16:06:44 +03:00
Stanislav Erokhin 446816e3db Created automatic labeling of function expression. 2015-03-18 16:06:44 +03:00
Alexey Sedunov 7d278f2f42 Use class name as secondary constructor name 2015-03-18 10:56:33 +03:00
Michael Nedzelsky b0b90ff6a9 add KotlinJavascriptSerializerTest 2015-03-18 09:39:06 +03:00
Michael Nedzelsky 33cdf8c969 JS backend: add cli test for creating metadata and ant test for library with metadata 2015-03-18 09:39:04 +03:00
Michael Nedzelsky 3bf14518e8 JS backend: add -meta-info command line option for cli compiler 2015-03-18 09:38:53 +03:00
Zalim Bashorov 8421a15521 JS backend: report diagnostic when try to get referenece on builtin members instead of crash with Exception. 2015-03-18 08:55:56 +03:00
Zalim Bashorov 975c4ffab5 JS backend: report diagnostic for class literal(Foo::class) instead of crash with Exception. 2015-03-18 08:55:56 +03:00
Zalim Bashorov 8d6cbb671a JS backend: report diagonstic message for unsupported element instead of throw exception.
#KT-6507 Fixed
2015-03-18 08:55:56 +03:00
Alexander Udalov a4f9fe1eaa Filter out invisible fakes in KClass.properties
A user will rarely need those at the moment, and there's currently no other way
to let him filter out them by himself
2015-03-17 23:39:13 +03:00
Alexander Udalov d3abd54b06 Add 'val KClass.declaredProperties', make getProperties a property 2015-03-17 23:39:13 +03:00
Denis Zharkov 36665fe3b8 Change logic of constructor delegation call resolution
- If class has type arguments (A<T1,..>) then
  resolve it's delegation call to `this` as for expression A<T1, ..>()
  like type arguments are explicitly specified.

- Same logic works for `super` delegation calls.

- It could be just enough to substitute all candidates before resolve
  but diagnostic messages looks more correct when substitution is
  performed within CandidateResolver.performResolutionForCandidateCall
  because it works the same way as when resolving A<T1, ..>().

 #KT-6992 Fixed
 #KT-6993 Fixed
 #KT-6994 Fixed
2015-03-17 23:18:35 +03:00
Denis Zharkov 9cecd69a9e Drop unneeded condition that leads to error
This check is obsolete but leads to problems.

It appears when resolving recursive calls (see sameTypeParameterUse.kt):

`foo<R>(x: R, y: R)` within call `foo<R>(x, "")` after substitution
has R as type of it's second argument, and when checking value arguments,
x is not checked because supposed to be dependent on type parameter of candidate
(that is effectively false), so there are two successful candidates
in resolution results and wrong OVERLOAD_RESOLUTION_AMBIGUITY error.
2015-03-17 23:18:34 +03:00
Denis Zharkov 9e5192e0e3 Prohibit val/vars/modifiers on secondary constructor parameter
#KT-6962 Fixed
2015-03-17 23:18:33 +03:00
Pavel V. Talanov 06916d98c6 default -> companion: replace all mentions of default and default object 2015-03-17 15:47:39 +03:00
Michael Bogdanov 11ce50f0d6 Tests for obsolete KT-6434: android compile error: local variable type mismatch
#KT-6434 Obsolete
2015-03-17 11:39:28 +03:00
Alexander Udalov 094fa2f92b Report error on using reflection without kotlin-reflect.jar in classpath
Should be a warning because strictly speaking, the codegen doesn't need it
during the compilation. It's an error at the moment only to let all clients of
Kotlin reflection know that they must include kotlin-reflect.jar in the
classpath
2015-03-16 20:40:49 +03:00
Nikolay Krasko 8c5109d819 Generate descriptor for trait constructor. Exception is thrown otherwise...
EA-38416, EA-65189, EA-60850
2015-03-16 20:16:25 +03:00
Michael Bogdanov 0999cd99e3 Inline iterator test 2015-03-16 18:52:05 +03:00
Michael Bogdanov 3a5b55fc61 Mute some tests 2015-03-16 18:52:04 +03:00
Michael Bogdanov 5c6b9b1bc6 New smap test 2015-03-16 18:52:04 +03:00
Michael Bogdanov ea2f9e91e9 Test fix - update and review required 2015-03-16 18:52:01 +03:00
Michael Bogdanov a4117360a2 Smap refactorings 2015-03-16 18:52:01 +03:00
Yan Zhulanow b0125a3626 Fix compiler plugin cli tests with colons in .args on Windows 2015-03-16 17:32:17 +03:00
Yan Zhulanow d5e4775bcd Show plugin usage on invalid arguments 2015-03-13 15:46:37 +03:00
Yan Zhulanow 7d31b56ef6 Android plugin cli arguments test 2015-03-13 15:46:37 +03:00
Alexander Udalov 8af6ca5279 Delete kotlin.jvm.internal.KObject
It was supposed to be used in reflection but the benefits do not outweigh the
cost of KT-6951

 #KT-3223 Fixed
 #KT-6951 Fixed
2015-03-12 23:15:38 +03:00
Alexander Udalov e5d5b49ce2 Fix exception from ::class literals on unresolved classes 2015-03-12 23:14:55 +03:00
Stanislav Erokhin 8accdcc5cb Fix type inference for function expression parameters 2015-03-12 17:11:53 +03:00
Stanislav Erokhin f47f285868 Expected function type used for parameter types inference in function expression 2015-03-12 17:11:53 +03:00
Stanislav Erokhin 639003b8a8 Allowed function parameter without type declaration in the parser 2015-03-12 17:11:52 +03:00
Stanislav Erokhin d9882a6d0b Move inference parameter type in FunctionDescriptorResolver 2015-03-12 17:11:52 +03:00
Stanislav Erokhin fa9ca54e78 Fixed local return inside function expression. 2015-03-12 17:11:47 +03:00
Stanislav Erokhin 929f1bc9ba Fixed method hasTypeParameterListBeforeFunctionName in JetNamedFunction 2015-03-12 17:11:47 +03:00
Stanislav Erokhin a89b48c577 Backend support for function expression 2015-03-12 17:11:46 +03:00