diff options
author | Martin Odersky <odersky@gmail.com> | 2016-10-10 09:40:08 +0200 |
---|---|---|
committer | Guillaume Martres <smarter@ubuntu.com> | 2016-10-12 16:13:49 +0200 |
commit | d8127d2f0f31913cca7eb60a721b25974b3bfde6 (patch) | |
tree | 1cc9d26f86767589430afdd105cefa5eab21433a /src/dotty/tools/dotc/parsing/Parsers.scala | |
parent | df2187e51e7a38a6ca8260ab4a415a7cd5efdcfc (diff) | |
download | dotty-d8127d2f0f31913cca7eb60a721b25974b3bfde6.tar.gz dotty-d8127d2f0f31913cca7eb60a721b25974b3bfde6.tar.bz2 dotty-d8127d2f0f31913cca7eb60a721b25974b3bfde6.zip |
Use => instead of -> for PolyTypes
If PolyTypes are to become value types we want to keep `=>` as the arrow
for consistency. `->` should be reserved for PolyTypes that do not have
side effects on instantiation.
Diffstat (limited to 'src/dotty/tools/dotc/parsing/Parsers.scala')
-rw-r--r-- | src/dotty/tools/dotc/parsing/Parsers.scala | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/dotty/tools/dotc/parsing/Parsers.scala b/src/dotty/tools/dotc/parsing/Parsers.scala index ab4e38638..507a2e80c 100644 --- a/src/dotty/tools/dotc/parsing/Parsers.scala +++ b/src/dotty/tools/dotc/parsing/Parsers.scala @@ -701,9 +701,9 @@ object Parsers { else if (in.token == LBRACKET) { val start = in.offset val tparams = typeParamClause(ParamOwner.TypeParam) - if (isIdent && in.name.toString == "->") + if (in.token == ARROW) atPos(start, in.skipToken())(PolyTypeTree(tparams, typ())) - else { syntaxErrorOrIncomplete(expectedMessage("`->'")); typ() } + else { accept(ARROW); typ() } } else infixType() |