Commit Graph

4349 Commits

Author SHA1 Message Date
Yan Zhulanow c39327dd74 Fix tests for 'infix' 2015-10-07 21:56:07 +03:00
Mikhail Glukhikh 0cc861f00b Exposed visibility checking, a set of exposed visibility tests, some test fixes
Effective visibility mechanism introduced.
Local is considered as public, java protected as Kotlin protected, java package private as Kotlin private.
2015-10-07 20:15:16 +03:00
Michael Bogdanov 264d7da450 PACKAGE_VISIBILITY normalization chaged to PROTECTED 2015-10-07 18:10:55 +03:00
Michael Bogdanov 882f6113dc Initial internal member mangling 2015-10-07 18:10:54 +03:00
Yan Zhulanow 1b01e7a85a Fix tests ('infix') 2015-10-07 15:50:23 +03:00
Yan Zhulanow 7e8674c6ee Fix resolve (members/extensions with 'infix' has higher priority) 2015-10-07 15:49:50 +03:00
Yan Zhulanow 1238e93b9f Diagnostics on 'infix' (declaration&use site) 2015-10-07 15:49:28 +03:00
Mikhail Glukhikh fff434d377 data + open / inner / abstract / sealed are now forbidden 2015-10-07 15:13:14 +03:00
Mikhail Glukhikh 7331eec817 override is forbidden inside annotations 2015-10-07 11:57:41 +03:00
Mikhail Glukhikh c07f0e9602 private / internal / protected are forbidden in annotations 2015-10-07 11:57:39 +03:00
Mikhail Glukhikh cba6870f52 protected & internal are now forbidden in interfaces 2015-10-07 11:57:14 +03:00
Mikhail Glukhikh 846d7cac69 protected is deprecated inside objects and forbidden inside annotations and enum entries 2015-10-07 10:21:11 +03:00
Denis Zharkov 6a1566a6dc Make JVM backend work with Collection.size as val
0. Such properties are called special because their accessor JVM name differs from usual one
1. When making call to such property, always choose special name
2. When generating Kotlin class inheriting such property generate `final bridge int size() { return this.getSize(); }`
3. If there is no `size` declaration in current class generate `bridge int getSize() { // super-call }`
2015-10-07 08:46:35 +03:00
Denis Zharkov 252c82abe3 Generate bridges for FAKE_OVERRIDE properties
The same way it's done for function, just call generateBridges for accessors

 #KT-9442 Fixed
2015-10-07 08:46:34 +03:00
Denis Zharkov c21d827326 Adjust various testData to size transformation 2015-10-07 08:46:34 +03:00
Denis Zharkov 547aa2cda6 Load special java methods as properites
Currently only those that override special builtin properties (e.g. `Collection.size`)
Their modality is defined by method's modality
2015-10-06 23:56:17 +03:00
Denis Zharkov a02b64f0e3 Setup overridability rules for properties built on Java fields
- They overrides each other
- They do not overrides Kotlin propeties and vice versa
2015-10-06 23:56:17 +03:00
Denis Zharkov 9d087ce5bd Convert size() functions in builtins to properties
Just like it will work itself out :)
2015-10-06 23:56:17 +03:00
Dmitry Jemerov 7c20630272 diagnostics for deprecated syntax of function type parameter list 2015-10-06 16:20:47 +02:00
Pavel V. Talanov 508b401603 Codegen: fix callable reference to member imported from object 2015-10-06 16:31:22 +03:00
Pavel V. Talanov 37d5c4b223 Allow to import members from object by name
Wrap object members so they do not require dispatch receiver
Hack jvm backend to make it work
2015-10-06 16:31:21 +03:00
Dmitry Petrov 4a3f53b322 Revert fbf2424838:
postpone "transparent semantics for spread operator"
until Java-related design issues are resolved (java.utils.Arrays#asList).
2015-10-06 13:48:59 +03:00
Dmitry Petrov fbf2424838 Spread should always copy arrays. 2015-10-06 10:07:12 +03:00
Dmitry Petrov 9e546bda27 Support is/as/as? with Function[K]<...> types. 2015-10-06 10:06:27 +03:00
Stanislav Erokhin b69197962d KT-9461: Inference failed: type parameter fixed early
#KT-9461 Fixed
2015-10-05 20:32:44 +03:00
Michael Nedzelsky 483110332c fix KT-431 Prohibit safe calls on namespaces, super etc
#KT-431 Fixed
2015-10-05 13:14:42 +03:00
Michael Bogdanov cd78514b76 Code clean, small refactorings and tests
#KT-8987 Fixed
2015-10-03 10:53:22 +03:00
Michael Bogdanov 3806ad65fc Fixed error with wrong parameter size calculation 2015-10-03 10:53:21 +03:00
Michael Bogdanov 2a19b06874 new tests 2015-10-03 10:53:18 +03:00
Michael Bogdanov c83a5b8bd5 Proper param propagation in inline 2015-10-03 10:53:17 +03:00
Michael Bogdanov 1f2b9ce72b Addded DefaultCallMask class and extended interface for argument generation 2015-10-03 10:53:12 +03:00
Alexander Udalov 661f4efc68 Forbid callable references to members and extensions with empty LHS
This syntax is reserved to be likely used in the future as a shorthand for
"this::foo" where the resulting expression doesn't take the receiver as a
parameter but has "this" already bound to it
2015-10-03 04:37:04 +03:00
Alexander Udalov f310d4c10e Don't write Kotlin metadata in light classes mode
This was already happening for classes and packages, now will also for
interface DefaultImpls and any other possible classes
2015-10-03 01:03:35 +03:00
Alexander Udalov 041af28166 Deprecate and don't write KotlinClass$Kind, to be removed later 2015-10-03 00:59:30 +03:00
Alexander Udalov 056bb3f833 Deprecate and don't write KotlinSyntheticClass$Kind, to be removed later 2015-10-03 00:59:28 +03:00
Dmitry Petrov 1f69ae254d KT-9377 Support is-checks for read-only collections
Additional tests.
2015-10-02 15:17:00 +03:00
Dmitry Petrov 06d9ff6a71 KT-9377 Support is-checks for read-only collections
Generate better code for 'as?' with mutable collection types:
use CHECKCAST, do not introduce special intrinsics for safe-as.
2015-10-02 15:17:00 +03:00
Dmitry Petrov e033d093d4 KT-9377 Support is-checks for read-only collections
Reorganize marker interfaces and is/as/as? intrinsics.
2015-10-02 15:17:00 +03:00
Dmitry Petrov 6cb0e5151c KT-9377 Support is-checks for read-only collections
Intrinsics for is/as/as? with mutable Kotlin collections and related types.
2015-10-02 15:17:00 +03:00
Dmitry Petrov 35881198c3 KT-9377 Support is-checks for read-only collections
Marker interfaces for mutable Kotlin collections and related classes.
2015-10-02 15:17:00 +03:00
Michael Bogdanov e91c556d06 Fix for wrong local variable table at inlining lambda with finallies 2015-10-02 13:41:41 +03:00
Pavel V. Talanov a3fbf2fabc Test that primitives, arrays, enums are implicitly serializable on jvm and not js
Specifically test calling java function that accepts java.io.Serializable
2015-10-01 17:53:19 +03:00
Pavel V. Talanov 7b49baf8c3 Test data adjustment: JetDiagnosticsTest 2015-10-01 17:53:19 +03:00
Pavel V. Talanov bc8449a70c Test data adjustment: Resolved calls and constraint system test 2015-10-01 17:53:18 +03:00
Pavel V. Talanov e263c85142 JetTypeChecker: adjust test data
after making some of builtin types serializable
2015-10-01 17:53:17 +03:00
Zalim Bashorov 073b10072a Minor: fix testdata 2015-10-01 14:57:26 +03:00
Mikhail Glukhikh 361448de8b Rename: private / final property in trait --> in interface 2015-09-30 19:38:19 +03:00
Mikhail Glukhikh 7256a546df Visibility modifiers are no longer allowed on local classes 2015-09-30 19:38:16 +03:00
Mikhail Glukhikh 7a99b3872b Forbid private functions with no body and private properties in traits which are abstract by default 2015-09-30 19:38:02 +03:00
Mikhail Glukhikh 930402d910 Incorrect 'inner' usage is diagnosed by parent, not by target 2015-09-30 17:54:47 +03:00