diff options
author | Lukas Rytz <lukas.rytz@gmail.com> | 2014-05-09 16:47:56 +0200 |
---|---|---|
committer | Lukas Rytz <lukas.rytz@gmail.com> | 2014-05-09 18:52:45 +0200 |
commit | f0c33206bc125cf4326a340e2cd7c7ec2f360726 (patch) | |
tree | 660b6fe5099ee061c79ce89fcb8ea00691c95daf /test/files/run | |
parent | 908ccd9feea072b4ed249db5f2741f745b42ca75 (diff) | |
download | scala-f0c33206bc125cf4326a340e2cd7c7ec2f360726.tar.gz scala-f0c33206bc125cf4326a340e2cd7c7ec2f360726.tar.bz2 scala-f0c33206bc125cf4326a340e2cd7c7ec2f360726.zip |
SI-8570 set the checkinit bit for unit-typed fields of traits
Fix only, refactoring in subsequent commit.
Diffstat (limited to 'test/files/run')
-rw-r--r-- | test/files/run/t8570.flags | 1 | ||||
-rw-r--r-- | test/files/run/t8570.scala | 10 | ||||
-rw-r--r-- | test/files/run/t8570a.check | 1 | ||||
-rw-r--r-- | test/files/run/t8570a.flags | 1 | ||||
-rw-r--r-- | test/files/run/t8570a.scala | 14 |
5 files changed, 27 insertions, 0 deletions
diff --git a/test/files/run/t8570.flags b/test/files/run/t8570.flags new file mode 100644 index 0000000000..3d1ee4760a --- /dev/null +++ b/test/files/run/t8570.flags @@ -0,0 +1 @@ +-Xcheckinit diff --git a/test/files/run/t8570.scala b/test/files/run/t8570.scala new file mode 100644 index 0000000000..bbe83e9080 --- /dev/null +++ b/test/files/run/t8570.scala @@ -0,0 +1,10 @@ +trait Trait40_1 { + val value37_2 = () + def run = { value37_2 } +} + +object Test { + def main(args: Array[String]) { + (new Trait40_1 {}).run + } +} diff --git a/test/files/run/t8570a.check b/test/files/run/t8570a.check new file mode 100644 index 0000000000..6a452c185a --- /dev/null +++ b/test/files/run/t8570a.check @@ -0,0 +1 @@ +() diff --git a/test/files/run/t8570a.flags b/test/files/run/t8570a.flags new file mode 100644 index 0000000000..3d1ee4760a --- /dev/null +++ b/test/files/run/t8570a.flags @@ -0,0 +1 @@ +-Xcheckinit diff --git a/test/files/run/t8570a.scala b/test/files/run/t8570a.scala new file mode 100644 index 0000000000..ef116e2a8a --- /dev/null +++ b/test/files/run/t8570a.scala @@ -0,0 +1,14 @@ +trait Trait40_1 { + val value37_2 = () + def run = { value37_2 } +} + +trait T1 extends Trait40_1 { + override val value37_2 = () +} + +object Test { + def main(args: Array[String]) { + println((new T1 {}).run) + } +} |