Commit Graph

4 Commits

Author SHA1 Message Date
Dmitry Petrov 5d9ee7efee Java 8 rules for method overrides:
- base class method wins against a (default) interface method,
so an abstract base class method should always be implemented
in a derived class;

- interface methods clash regardless of abstract/default
with possibly undefined behavior at run-time,
so a class or interface should always define its own method
for methods inherited from multiple interfaces and not from base class;

- meaningful diagnostics for class inheriting conflicting JVM signatures.
Since no override will happen under Java 8 rules,
ACCIDENTAL_OVERRIDE is misleading for this case;

- update testData.
2015-10-12 14:12:31 +03:00
Dmitry Jemerov 4bdf598bfe compiler testdata: s/trait/interface 2015-05-12 19:43:17 +02:00
Alexander Udalov 3c3d120004 Prohibit implicit overrides with lesser visibility
A non-abstract super-declaration is allowed to stand as 'an implementation' of
a fake override only if its visibility is not less than visibilities of all
other super-declarations

 #KT-2491 Fixed
2014-05-22 19:32:10 +04:00
Alexander Udalov 7fcd42f40c Fix annoying parameter name override warning
Some corner cases still remain: KotlinSignature, propagation, deserialized
delegates to Java interfaces

 #KT-1239 Obsolete
 #KT-1924 In Progress
 #KT-2081 Fixed
2014-03-19 23:24:27 +04:00