Commit Graph

2998 Commits

Author SHA1 Message Date
Alexander Udalov 87387d030f Minor, fix yellow code in OverrideResolver and OverridingUtil 2016-07-13 13:42:46 +03:00
Alexander Udalov 8f33830f29 Suppress UNCHECKED_CAST instead of CAST_NEVER_SUCCEEDS in several places
This is related to KT-6611 being fixed recently. Note that not all cases of
incorrect "cast never succeeds" were fixed
2016-07-13 13:42:42 +03:00
Dmitry Jemerov e492d23d58 more sensible docs for @MustBeDocumented 2016-07-12 16:23:58 +02:00
Alexander Udalov 720c29e8f4 Minor, fix NonExistentClass name and format 2016-07-07 13:56:01 +03:00
Denis Zharkov 2cc09f928e Allow suspend extensions for specially annotated controllers 2016-07-06 15:25:19 +03:00
Alexander Udalov 9bf91e95d0 Change default visibility for TypeAlias from 'internal' to 'public'
Since public type aliases will supposedly be more common than internal ones, it
makes sense to save on writing flags for the former rather than the latter
2016-07-05 18:18:45 +03:00
Alexander Udalov a48e1680e9 Minor, fix typo in KParameter#isOptional kdoc 2016-07-05 18:18:44 +03:00
Alexander Udalov 3b349e9be0 Fix reflection on reference to generic property
See a93484b457 for the similar fix to function
references

 #KT-12967 Fixed
2016-07-05 18:18:43 +03:00
Denis Zharkov 60a0cd8cfd Do not add error types as upper bounds in type parameter
#KT-10237 Fixed
 #KT-11821 Fixed
 #KT-8200 Fixed
2016-07-04 18:16:05 +03:00
Denis Zharkov 7723a3a105 Refine definition of whether single parameter the method should be boxed
Only 'Collection<Int>.remove(E): Boolean' should match
2016-07-04 15:44:00 +03:00
Denis Zharkov adff666b0e Introduce additional overridability rule
It works only for Java methods and it's purpose is Java overridability rules emulation,
namely distinction of primitive types and their wrappers.

For example `void foo(Integer x)` should not be an override for `void foo(int x)`

 #KT-11440 Fixed
 #KT-11389 Fixed
2016-07-04 15:44:00 +03:00
Denis Zharkov 082c4f971e Minor. Extract overridability rule into separate method 2016-07-04 15:44:00 +03:00
Denis Zharkov 167882df5d Temporary return BuiltinOverridabilityCondition class
Otherwise bootstrap problems appear
2016-07-04 15:44:00 +03:00
Denis Zharkov dc713cda2c Rename: BuiltinOverridabilityCondition -> JavaIncompatibilityRulesOverridabilityConditionBuiltinOverridabilityCondition 2016-07-04 15:44:00 +03:00
Alexander Udalov c07d0d48d3 Fix KCallable#callBy to JvmStatic companion object members
#KT-12915 Fixed
2016-06-30 19:41:47 +03:00
Denis Zharkov f1363cbf88 Fix visibility checks for constructor call based on type alias
Constructor is invisible iff. either underlying constructor or corresposing type alias is invisible

 #KT-12888 Fixed
2016-06-28 16:22:08 +03:00
Denis Zharkov d53c53a900 Support annotations on type aliases declarations 2016-06-28 10:33:29 +03:00
Denis Zharkov 067fe35b72 Fix type deserialization failure when type alias was not found
It's crucial for decompilation as declarations are always being deserialized
with no dependencies

 #KT-12832 Fixed
2016-06-28 10:33:29 +03:00
Denis Zharkov 15ce4f8856 Minor. Add comment about type aliases based types metadata format 2016-06-28 10:33:29 +03:00
Denis Zharkov d78177dc23 Refine metadata format for typealias based type 2016-06-28 10:33:29 +03:00
Denis Zharkov d39d36b94c Render unabbreviated part of type wrapped in common comments
It's necessary for preserving DescriptorRenderer invariant, namely
only valid code should be generated
2016-06-28 10:33:29 +03:00
Alexander Udalov 4c8e8b099a Update protobuf from 2.5.0 to 2.6.1 2016-06-27 20:14:00 +03:00
Mikhael Bogdanov db5d9940df Added 'isInline' implementation to property accessor descriptors 2016-06-24 17:05:48 +03:00
Yan Zhulanow 6752df189d Make infix modifier diagnostic message more informative (KT-12589)
(cherry picked from commit 2744309)
2016-06-24 15:10:19 +03:00
Denis Zharkov 8caee7940e Use 'Any?' instead of throwing NPE when calculating star projection type
It's a quite hacky solution, but the choice seems to be conservative, so these types can be refined later

 #KT-9597 Fixed
2016-06-24 10:23:16 +03:00
Alexander Udalov cf630e01db Minor, refactor "is KProperty" checks in ReflectionTypes 2016-06-22 21:35:57 +03:00
Stanislav Erokhin 065c4e19ec Add debug info for EA-79267 - (T is not T) assert: TypeCheckingProcedure.checkSubtypeForTheSameConstructor 2016-06-22 19:42:09 +03:00
Stanislav Erokhin 7389d412a5 Fixed visibility check on a property with private setter of the subclass
#KT-3689 Fixed
2016-06-22 19:42:08 +03:00
Alexey Andreev 2e6a48576d KT-12417: add support of RTTI against K(Mutable)Property* types 2016-06-21 15:42:50 +03:00
Denis Zharkov 132190a71e Minor. Optimize imports 2016-06-21 11:07:36 +03:00
Denis Zharkov fe5fe63f0a Fix visibility check for dynamic members within protected method
#KT-11857 Fixed
2016-06-21 11:07:36 +03:00
Alexander Udalov 311301f430 Check return type when locating method in reflection
#KT-11824 Fixed
2016-06-20 21:03:51 +03:00
Pavel V. Talanov bafe8e55ce Create SyntheticMemberDescriptor interface
Implement this interface by sam adapters/constructors and use it in navigation

 #KT-11708 Fixed
2016-06-20 20:15:34 +03:00
Denis Zharkov 6795393989 Introduce 'handleException' operator and relevant checks 2016-06-19 12:50:52 +03:00
Alexander Udalov 6562a2db19 Type-check reference to property with invisible setter to KProperty
#KT-12337 Fixed
2016-06-19 12:45:22 +03:00
Alexander Udalov 02fd5371aa Update metadata version to 1.1.2 and bytecode version to 1.0.1
This is needed for the upcoming 1.1 EAP: it'll be easier to diagnose problems
arising from new language features and bytecode modifications
2016-06-16 16:51:18 +03:00
Mikhael Bogdanov fc8058848f Added classVersion to KotlinJvmBinaryClass 2016-06-15 13:43:26 +03:00
Alexander Udalov 7e38b93d80 Use protobuf with renamed packages, pack to IDEA plugin
Update GenerateProtoBuf.kt to also regexp-replace com.google.protobuf with
org.jetbrains.kotlin.protobuf in generated Java sources

 #KT-12581 Fixed
2016-06-14 14:17:22 +03:00
Mikhail Glukhikh 10935ba9db Wrap with safe let call : minor refactoring 2016-06-13 15:42:04 +03:00
Dmitry Petrov 0ff677596f Modifiers checking for type aliases.
Exposed type checking for type aliases.
2016-06-10 16:21:26 +03:00
Dmitry Petrov 115f40d371 UNUSED_TYPEALIAS_PARAMETER: special diagnostic for typealias parameters
explicitly telling that such type parameters are not used in type checking.
Move typealias-related utility functions on types to TypeUtils.kt.
2016-06-10 16:21:25 +03:00
Dmitry Petrov c04b16d6cc Type parameters for type alias constructor are declared type parameters for type alias
(no implicit type parameters from containing scopes).
2016-06-10 10:25:09 +03:00
Dmitry Petrov 12710bec2f Redeclaration errors for type aliases: type alias vs function. 2016-06-10 10:25:08 +03:00
Denis Zharkov 036f90053e Minor. Fix formatting 2016-06-09 17:57:15 +03:00
Denis Zharkov 92bd6880da Add AdditionalBuiltInsMembers language feature and relevant checks 2016-06-09 17:57:15 +03:00
Alexander Udalov 59342000ae Fix toString() and reflectLambda() for lambdas with generic types in signatures
#KT-10771 Fixed
2016-06-09 17:28:56 +03:00
Alexander Udalov dc2972d99e Implement copy in FunctionDescriptorImpl, call doSubstitute only in CopyConfiguration#build 2016-06-09 17:28:56 +03:00
Alexander Udalov 3477f6ee85 Minor, drop java_generic_services option from .proto files
There are no service definitions in our .proto files, so this option had no
effect
2016-06-09 15:54:49 +03:00
Stanislav Erokhin 541b9954f5 Minor. Roll back behaviour for FlexibleType.isError. 2016-06-09 12:58:23 +03:00
Stanislav Erokhin 74be53d297 Add documentation for KotlinType. 2016-06-09 12:58:21 +03:00