diff options
author | Paul Phillips <paulp@improving.org> | 2012-02-17 16:07:49 -0800 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2012-02-17 16:07:49 -0800 |
commit | 8d5ce774a869814d802c54b180f13aeffdeceba0 (patch) | |
tree | 4e09ced77b936804b1e05c8207baffd8ab49d469 /src/compiler | |
parent | 1f4f1235920fe87e1b1bdfd042683d9651f1d4f1 (diff) | |
parent | 0288a0788ae1ffbe9064992f1ac02f647bb64c17 (diff) | |
download | scala-8d5ce774a869814d802c54b180f13aeffdeceba0.tar.gz scala-8d5ce774a869814d802c54b180f13aeffdeceba0.tar.bz2 scala-8d5ce774a869814d802c54b180f13aeffdeceba0.zip |
Merge branch 'develop'
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/scala/tools/nsc/ast/parser/Parsers.scala | 2 | ||||
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Typers.scala | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala b/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala index fe6dcc9138..e3a59058a3 100644 --- a/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala +++ b/src/compiler/scala/tools/nsc/ast/parser/Parsers.scala @@ -1205,7 +1205,7 @@ self => */ def wildcardType(start: Int) = { val pname = freshTypeName("_$") - val t = atPos(start) { Ident(pname) } + val t = atPos(start)(Ident(pname)) val bounds = typeBounds() val param = atPos(t.pos union bounds.pos) { makeSyntheticTypeParam(pname, bounds) } placeholderTypes = param :: placeholderTypes diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala index 23fc30b9fb..e7cd139ce0 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala @@ -2169,6 +2169,10 @@ trait Typers extends Modes with Adaptations with PatMatVirtualiser { // error for this is issued in RefChecks.checkDefaultsInOverloaded if (!e.sym.isErroneous && !e1.sym.isErroneous && !e.sym.hasDefaultFlag && !e.sym.hasAnnotation(BridgeClass) && !e1.sym.hasAnnotation(BridgeClass)) { + log("Double definition detected:\n " + + ((e.sym.getClass, e.sym.info, e.sym.ownerChain)) + "\n " + + ((e1.sym.getClass, e1.sym.info, e1.sym.ownerChain))) + DefDefinedTwiceError(e.sym, e1.sym) scope.unlink(e1) // need to unlink to avoid later problems with lub; see #2779 } |