diff options
author | Guillaume Martres <smarter@ubuntu.com> | 2017-02-28 22:43:24 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-28 22:43:24 +0900 |
commit | 783b978a4ebbe737a9b8467697a9f6970f99e907 (patch) | |
tree | 472ee74c522fda8dac6461fbb13de6f17b2777a9 /compiler/src/dotty/tools/dotc/typer | |
parent | 179a5d601575bc4f07239667cc1f3fa758f8e98d (diff) | |
parent | 145ac696c9a2cb26655e954b4a6be879a3500641 (diff) | |
download | dotty-783b978a4ebbe737a9b8467697a9f6970f99e907.tar.gz dotty-783b978a4ebbe737a9b8467697a9f6970f99e907.tar.bz2 dotty-783b978a4ebbe737a9b8467697a9f6970f99e907.zip |
Merge pull request #2035 from dotty-staging/fix-#2033
Fix #2033: Improve handling of unresolved overloaded arguments
Diffstat (limited to 'compiler/src/dotty/tools/dotc/typer')
-rw-r--r-- | compiler/src/dotty/tools/dotc/typer/Applications.scala | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/compiler/src/dotty/tools/dotc/typer/Applications.scala b/compiler/src/dotty/tools/dotc/typer/Applications.scala index de017961a..e9df12b42 100644 --- a/compiler/src/dotty/tools/dotc/typer/Applications.scala +++ b/compiler/src/dotty/tools/dotc/typer/Applications.scala @@ -450,7 +450,16 @@ trait Applications extends Compatibility { self: Typer with Dynamic => def typedArg(arg: Arg, formal: Type): Arg = arg def addArg(arg: TypedArg, formal: Type) = - ok = ok & isCompatible(argType(arg, formal), formal) + ok = ok & { + argType(arg, formal) match { + case ref: TermRef if ref.denot.isOverloaded => + // in this case we could not resolve overloading because no alternative + // matches expected type + false + case argtpe => + isCompatible(argtpe, formal) + } + } def makeVarArg(n: Int, elemFormal: Type) = {} def fail(msg: => Message, arg: Arg) = ok = false |