diff options
author | Martin Odersky <odersky@gmail.com> | 2016-09-24 16:50:58 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2016-09-24 16:50:58 +0200 |
commit | 331e75be7e90817bc2931c3d00dd931b22c179f5 (patch) | |
tree | e9541e8aad22f3d6f8e9b4ade3eab1ad644a46c6 /src/dotty/tools/dotc/typer/Typer.scala | |
parent | fb710457959d1c2d4b983986141875a8fde5992b (diff) | |
download | dotty-331e75be7e90817bc2931c3d00dd931b22c179f5.tar.gz dotty-331e75be7e90817bc2931c3d00dd931b22c179f5.tar.bz2 dotty-331e75be7e90817bc2931c3d00dd931b22c179f5.zip |
Swap order of elements in Annotated
Now it's annotated first, annotation second.
This is in line with AnnotatedType and in line with the principle
that tree arguments should come in the order they are written. The
reason why the order was swapped before is historical - Scala2 did it
that way.
Diffstat (limited to 'src/dotty/tools/dotc/typer/Typer.scala')
-rw-r--r-- | src/dotty/tools/dotc/typer/Typer.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/typer/Typer.scala b/src/dotty/tools/dotc/typer/Typer.scala index dcba7e7c4..af09a8283 100644 --- a/src/dotty/tools/dotc/typer/Typer.scala +++ b/src/dotty/tools/dotc/typer/Typer.scala @@ -1342,7 +1342,7 @@ class Typer extends Namer with TypeAssigner with Applications with Implicits wit val annot1 = typedExpr(tree.annot, defn.AnnotationType) val arg1 = typed(tree.arg, pt) if (ctx.mode is Mode.Type) - assignType(cpy.Annotated(tree)(annot1, arg1), annot1, arg1) + assignType(cpy.Annotated(tree)(arg1, annot1), arg1, annot1) else { val tpt = TypeTree(AnnotatedType(arg1.tpe.widen, Annotation(annot1))) assignType(cpy.Typed(tree)(arg1, tpt), tpt) |