Commit Graph

14 Commits

Author SHA1 Message Date
Denis Zharkov
f0e3fd617d Adjust testData to CharSequence.length transformation 2015-10-14 20:39:35 +03:00
Dmitry Petrov
7e9e427d4c Java 8 rules for method overrides:
- report errors on implementing methods of Any in interfaces
- update testData

~~~

Java 8 override restrictions: interface can't implement a method of 'Any'
- update compiler sources
2015-10-12 14:12:31 +03:00
Mikhail Glukhikh
2fee9d362c Local interfaces are forbidden now 2015-10-09 21:06:33 +03:00
Dmitry Petrov
b59bf6227f unqualified super: should be able to invoke methods of Any without extra hassle
when Any is an implicit immediate superclass
2015-08-12 12:14:14 +03:00
dnpetrov
046189087a KT-5963 Call to super shouldn't require type specification if there is no conflict
Implemented unqualified 'super' type resolution (in BasicExpressionTypingVisitor).

No overload resolution of any kind is involved.
Corresponding supertype is determined by the expected member name only:
- 'super.foo(...)' - function or property (of possibly callable type) 'foo'
- 'super.x' - property 'x'
Supertype should provide a non-abstract implementation of such member.
As a fall-back solution for diagnostics purposes, consider supertypes with abstract implementation of such member.

Diagnostics:
- AMBIGUOUS_SUPER on 'super', if multiple possible supertypes are available;
- ABSTRACT_SUPER_CALL on selector expression, if the only available implementation is abstract.

#KT-5963 Fixed
2015-06-18 14:16:34 +03:00
Alexander Udalov
1a3209e1dc Drop traits with required classes
#KT-4771 Rejected
2015-06-17 16:23:58 +03:00
Dmitry Jemerov
4bdf598bfe compiler testdata: s/trait/interface 2015-05-12 19:43:17 +02:00
Stanislav Erokhin
b152211096 Added init keyword to testdata 2015-04-07 13:08:51 +03:00
Alexander Udalov
a7b88e9485 Make CharSequence.length a function instead of property
And String.length as well.

This is done for JVM interoperability: java.lang.CharSequence is an open class
and has a function 'length()' which should be implemented in subclasses
somehow.

A minor unexpected effect of this is that String.length() is now a compile-time
constant (it wasn't such as a property because properties are not supported in
compile-time constant evaluation)

 #KT-3571 Fixed
2014-11-27 20:38:17 +03:00
Mikhael Bogdanov
6fb0050575 KT-4982 this$0 is not initialized in the anonymous object
#KT-4982 Fixed
2014-05-16 13:33:39 +04:00
Mikhael Bogdanov
df03eb5330 KT-4173: Can't pass a non-trivial closure to a super-call for object expression
#KT-4173 Fixed
2013-11-08 15:19:20 +04:00
Mikhael Bogdanov
b6fc0c5c13 KT-3538: Super call to trait implemetation invokes method from base class 2013-04-24 15:52:09 +04:00
Mikhael Bogdanov
3da3f94b4e KT 3492: Bug in bytecode generation for labeled super call from inner class & Property generation refactoring 2013-04-17 15:23:33 +04:00
Alexander Udalov
41a416da60 Move blackBoxFile() testData to box/ directory
Delete all test methods (and empty test classes), since they'll be
auto-generated
2013-01-28 18:20:17 +04:00