aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/parsing/Parsers.scala
diff options
context:
space:
mode:
authorGuillaume Martres <smarter@ubuntu.com>2016-01-12 18:37:35 +0100
committerGuillaume Martres <smarter@ubuntu.com>2016-01-14 17:09:28 +0100
commit3b5c70bd5cecc542226e1766d9f9ba752a26b8ec (patch)
treea67afdfbd9052964b1d7f2254406ad03da10631c /src/dotty/tools/dotc/parsing/Parsers.scala
parentda661c8a509efaa1c0ff926b0907c32cd37708a5 (diff)
downloaddotty-3b5c70bd5cecc542226e1766d9f9ba752a26b8ec.tar.gz
dotty-3b5c70bd5cecc542226e1766d9f9ba752a26b8ec.tar.bz2
dotty-3b5c70bd5cecc542226e1766d9f9ba752a26b8ec.zip
Improve migration message for Scala 2 procedures
It's not correct to just add `=` you also need to specify the return type to be `Unit` otherwise things may not work as expected, this is especially important for a `main` method.
Diffstat (limited to 'src/dotty/tools/dotc/parsing/Parsers.scala')
-rw-r--r--src/dotty/tools/dotc/parsing/Parsers.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/parsing/Parsers.scala b/src/dotty/tools/dotc/parsing/Parsers.scala
index d59e087cb..bad6b95dc 100644
--- a/src/dotty/tools/dotc/parsing/Parsers.scala
+++ b/src/dotty/tools/dotc/parsing/Parsers.scala
@@ -1732,7 +1732,7 @@ object Parsers {
*/
def defDefOrDcl(mods: Modifiers): Tree = atPos(tokenRange) {
def scala2ProcedureSyntax =
- testScala2Mode("Procedure syntax no longer supported; `=' should be inserted here")
+ testScala2Mode("Procedure syntax no longer supported; `: Unit =' should be inserted here")
if (in.token == THIS) {
in.nextToken()
val vparamss = paramClauses(nme.CONSTRUCTOR)