diff options
author | Paul Phillips <paulp@improving.org> | 2009-02-18 22:03:28 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2009-02-18 22:03:28 +0000 |
commit | a626f6253829d0c8512551e8ae1290511cb077f1 (patch) | |
tree | 51e9e0e20d1279bbde2a5841ccdf3d9a6f016218 /test/files/neg | |
parent | 36b0e8178f74a2986bce5c9027b9a2b22a4e7527 (diff) | |
download | scala-a626f6253829d0c8512551e8ae1290511cb077f1.tar.gz scala-a626f6253829d0c8512551e8ae1290511cb077f1.tar.bz2 scala-a626f6253829d0c8512551e8ae1290511cb077f1.zip |
Issue warning when attempting to refine Unit, p...
Issue warning when attempting to refine Unit, plus test case; bug #284.
Diffstat (limited to 'test/files/neg')
-rw-r--r-- | test/files/neg/bug284.check | 8 | ||||
-rw-r--r-- | test/files/neg/bug284.scala | 6 |
2 files changed, 14 insertions, 0 deletions
diff --git a/test/files/neg/bug284.check b/test/files/neg/bug284.check new file mode 100644 index 0000000000..7e54672365 --- /dev/null +++ b/test/files/neg/bug284.check @@ -0,0 +1,8 @@ +bug284.scala:2: warning: Detected apparent refinement of Unit; are you missing an '=' sign? + def f1(a: T): Unit { } + ^ +bug284.scala:6: error: eof expected but '}' found. +} +^ +one warning found +one error found diff --git a/test/files/neg/bug284.scala b/test/files/neg/bug284.scala new file mode 100644 index 0000000000..c1817466b5 --- /dev/null +++ b/test/files/neg/bug284.scala @@ -0,0 +1,6 @@ +trait B[T] { + def f1(a: T): Unit { } + def f2(a: T): Unit + def f3(a: T) { } + } +}
\ No newline at end of file |