diff options
author | Martin Odersky <odersky@gmail.com> | 2015-01-27 11:13:54 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2015-01-27 11:13:54 +0100 |
commit | 130e9a20755d512b47ca0fe41d8dfc3f6879cf86 (patch) | |
tree | 317f8224d85705d9951bc129d3e3ec9079895a4d /src/dotty/tools/dotc/typer/ErrorReporting.scala | |
parent | eb4d80891bcfaf9ffa402ea36f1562c5f597e479 (diff) | |
download | dotty-130e9a20755d512b47ca0fe41d8dfc3f6879cf86.tar.gz dotty-130e9a20755d512b47ca0fe41d8dfc3f6879cf86.tar.bz2 dotty-130e9a20755d512b47ca0fe41d8dfc3f6879cf86.zip |
Use normnalized type to report type errors.
Without it, we get strange error messages like
found: (implicit X)Y
requred: Z
when the problem is really that Y is not a subtype of Z.
Diffstat (limited to 'src/dotty/tools/dotc/typer/ErrorReporting.scala')
-rw-r--r-- | src/dotty/tools/dotc/typer/ErrorReporting.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/typer/ErrorReporting.scala b/src/dotty/tools/dotc/typer/ErrorReporting.scala index 8e8cf58f9..2ed720f83 100644 --- a/src/dotty/tools/dotc/typer/ErrorReporting.scala +++ b/src/dotty/tools/dotc/typer/ErrorReporting.scala @@ -96,7 +96,7 @@ object ErrorReporting { def patternConstrStr(tree: Tree): String = ??? def typeMismatch(tree: Tree, pt: Type, implicitFailure: SearchFailure = NoImplicitMatches): Tree = { - errorTree(tree, typeMismatchStr(tree.tpe, pt) + implicitFailure.postscript) + errorTree(tree, typeMismatchStr(normalize(tree.tpe, pt), pt) + implicitFailure.postscript) } /** A subtype log explaining why `found` does not conform to `expected` */ |