Denis Zharkov
632e336782
Prohibit unsafe covariant conversion for collections invariant in Java
2015-09-02 10:39:29 +03:00
Denis Zharkov
6dc08f76a6
Preserve type capabilities while substituting
...
`val result` in test data rendered descriptors should be rendered as having raw type
2015-09-02 10:38:43 +03:00
Stanislav Erokhin
d015f713cb
KT-6244 Overloads with no default parameters should take over ones with defaults
...
#KT-6244 Fixed
2015-09-01 23:37:43 +03:00
Stanislav Erokhin
5ded315cbb
Improved error reporting for candidates with wrong parameter count
2015-09-01 23:37:42 +03:00
Alexey Tsvetkov
7101f9a3a4
Move GenerationState member up to further simplify constructor usages
2015-09-01 19:05:38 +03:00
Alexey Tsvetkov
0a11525dd5
Clean up GenerationState constructor usages
2015-09-01 19:05:37 +03:00
Alexey Tsvetkov
1e964c6302
Make "progress" parameter with last in GenerationState constructor
...
This parameter has a default value, so it's more convenient to have it
closer to the end of parameter list.
2015-09-01 19:05:37 +03:00
Alexey Tsvetkov
de23f7ace8
Move property declaration to constructor
2015-09-01 19:05:37 +03:00
Mikhail Glukhikh
754f8af3fc
Type<*> is inferred now if Type<A> and Type<B> common supertype is Type<X> and X is not within parameter upper bound. #KT-7585 Fixed. #EA-68943 Fixed.
...
It provides also a fix for KT-7585 (empty type intersection assertion).
A set of relevant tests, one fixed test
2015-09-01 15:49:29 +03:00
Alexander Udalov
f7a178f978
Report warning on 'Singleton.javaClass'
...
As a temporary measure before 'javaClass' property is deprecated and removed.
Getting the Java class of a singleton this way is confusing and most of the
time is a failed attempt to get the Java class of a class with a companion
object (e.g. 'Int.javaClass')
2015-09-01 11:36:57 +03:00
Ilya Chernikov
9bee97e810
Refactoring after review
2015-08-31 18:39:55 +02:00
ligee
434c30c1bc
Simple test with daemon compilation, minor fixes mostly for easier testing
2015-08-31 18:39:53 +02:00
Yan Zhulanow
2ce9903356
Fix tests
2015-08-31 15:33:13 +03:00
Yan Zhulanow
552211b2f4
Add bytecode listing test for use site targets and default targets (with priorities)
2015-08-31 15:33:12 +03:00
Yan Zhulanow
1a477bd540
Add field and property deserialization tests
2015-08-31 15:33:04 +03:00
Yan Zhulanow
f86fe6a8d5
Allow multiple non-repeatable annotations with different targets
2015-08-31 15:33:02 +03:00
Yan Zhulanow
08c678ef46
Deserialize receiver parameter annotations for extension functions
2015-08-31 15:32:55 +03:00
Yan Zhulanow
b38b7071b7
Targeted annotation diagnostic tests
2015-08-31 15:32:53 +03:00
Yan Zhulanow
a1eb544807
Parser tests for targeted annotations
2015-08-31 15:07:15 +03:00
Yan Zhulanow
d56a3f97c6
Render annotations with use-site target
2015-08-31 15:05:03 +03:00
Alexander Udalov
a1097f7081
Add val KClass.staticProperties: Collection<KProperty0<*>>
...
To get static fields from Java classes
2015-08-29 18:37:41 +03:00
Alexander Udalov
593937d302
Support KCallable.callBy with map of parameters to arguments
...
callBy is able to handle optional parameters.
#KT-8827 Fixed
2015-08-29 18:37:40 +03:00
Alexander Udalov
0d62680f63
Support KParameter.isOptional
...
#KT-8825 Fixed
2015-08-29 18:37:39 +03:00
Alexander Udalov
fd97383f8a
Fix mapping of jvmStatic functions
...
#KT-8800 Fixed
2015-08-29 18:37:38 +03:00
Alexander Udalov
9a8cf23ed4
Support KClass.companionObject and companionObjectInstance
...
#KT-7636 Fixed
2015-08-29 18:37:32 +03:00
Alexander Udalov
94d45f35d4
Support KClass.nestedClasses
2015-08-29 17:59:45 +03:00
Valentin Kipyatkov
e8dc9ede31
Implemented HiddenDeclaration annotation (doc-comment to be added!)
2015-08-29 10:54:59 +03:00
Stanislav Erokhin
4c7bafce45
Global replace JetScope to LexicalScope
2015-08-29 01:45:56 +03:00
Alexander Udalov
7c28a2e732
Support KClass.defaultType
2015-08-28 21:22:11 +03:00
Alexander Udalov
d36ef90dd6
Provide equals/hashCode/toString for KParameter implementation
...
Two KParameter instances are equal iff their backing descriptors are equal and
their callables are equal
2015-08-28 21:11:30 +03:00
Alexander Udalov
d4825cf4f0
Support KParameter.kind: instance, extension receiver, or value
2015-08-28 21:11:22 +03:00
Alexander Udalov
a73d02418d
Introduce additional API for introspecting functions
...
memberFunctions, declaredMemberFunctions, staticFunctions, etc.
#KT-8797 Fixed
2015-08-28 21:11:21 +03:00
Alexander Udalov
ebe4a8ec89
Provide equals/hashCode/toString for KType implementation
2015-08-28 21:11:20 +03:00
Alexander Udalov
9882e86ecb
Don't render contents of enum entry classes in .txt tests, regenerate tests
...
They are irrelevant because cannot be accessed from the outside anyway
2015-08-28 21:11:06 +03:00
Alexander Udalov
29abf94327
Prohibit clone() for enum classes
...
#KT-8972 Fixed
2015-08-28 21:11:02 +03:00
Alexander Udalov
89f3cfc704
Support parameter names for Java 8 classes in reflection
...
Also support specifying additional options to javac in codegen tests, which was
needed to compile Java sources with the "-parameters" option
2015-08-28 21:11:01 +03:00
Denis Zharkov
5e09a0c2c9
Add some test cases after review
2015-08-28 18:50:25 +03:00
Denis Zharkov
b471767e03
Refine smart cast check for type parameters
2015-08-28 18:50:25 +03:00
Denis Zharkov
aad977d204
Properly check whether nullability of receiver argument fits to parameter's nullability
...
It's should behave like we check isSubtype(receiverType, parameterType) + use nullability info from smart cast
#KT-1090 Fixed
2015-08-28 18:50:25 +03:00
Denis Zharkov
6ecfa6e985
Refine subtyping check: pay attention to corresponding supertype nullability
...
F: Any, T : F? => !isSubtype(T, Any)
It helps to identify upper bounds violation like in KT-7455
#KT-7455 Fixed
#KT-2924 Fixed
#KT-3015 Fixed
2015-08-28 18:50:25 +03:00
Denis Zharkov
a906be6dd7
Prohibit using null as a value of generic type
...
#KT-7350 Fixed
#KT-7736 Fixed
#KT-7485 Fixed
2015-08-28 18:50:25 +03:00
Stanislav Erokhin
2a0159f23b
Created JetScope.memberScopeAsFileScope()
2015-08-27 12:01:11 +03:00
Stanislav Erokhin
9a435e332f
Fix InnerClassesScopeWrapper - remove properties and functions from this scope.
2015-08-27 12:01:07 +03:00
Alexander Udalov
56e12787a8
Fix exception on overridding var-property with a val constructor parameter
...
#KT-3810 Fixed
2015-08-27 10:23:49 +03:00
Alexander Udalov
8d9618348d
Move .java and .kotlin extension properties to kotlin.jvm
...
Delete the old ones in package kotlin.reflect.jvm because otherwise the code
using those functions will become red in a lot less meaningful way (overload
resolution ambiguity) than if they're deleted (unresolved import)
Based on the work originally done by @dnpetrov
#KT-8380 Fixed
2015-08-27 08:19:50 +03:00
Stanislav Erokhin
abb18b7bb9
KT-8861 Package name vs property with wrong receiver
...
#KT-8861 Fixed
2015-08-25 20:43:52 +03:00
Dmitry Jemerov
4743a69d76
rename platformName annotation to jvmName
2015-08-25 15:40:46 +02:00
Zalim Bashorov
bdd834604a
Add lacation parameter to ModuleDescriptor.resolveTopLevelClass (in DescriptorUtils.kt)
2015-08-24 19:50:09 +03:00
Zalim Bashorov
0ba18ca8cd
Track the top level declarations, note not usages
...
It'll be useful for more accurate tracking dependencies inside package.
2015-08-24 19:50:03 +03:00
Alexander Udalov
aba6ab1299
Refactor command-line interface to kotlin-preloader.jar
...
Use reasonable defaults for the options: no time profiling, no instrumenters,
empty classpath, 4096 as the class number estimate. Replace 4096 in the
codebase with the constant field.
Keep the old interface intact until the build is bootstrapped and the new one
can be used in all compilation steps
2015-08-24 01:29:58 +03:00