Synthesized 'copy' in data classes cannot override anything since 1.3

Synthesized 'copy' introduces default values for parameters, which is
prohibited for regular overrides.
Report warning in language version 1.2-, error in 1.3+.
This commit is contained in:
Dmitry Petrov
2017-09-12 15:10:03 +03:00
parent 9ae6feb2c5
commit 4c2cfd3ea9
17 changed files with 226 additions and 1 deletions

View File

@@ -1,3 +1,5 @@
// LANGUAGE_VERSION: 1.1
fun box(): String {
val a: A = B(1)
a.copy(1)