diff options
author | Martin Odersky <odersky@gmail.com> | 2014-03-08 22:23:24 +0100 |
---|---|---|
committer | Dmitry Petrashko <dmitry.petrashko@gmail.com> | 2014-03-20 13:02:40 +0100 |
commit | 3eab4101f516ececde15df74ca382a9fd7018fa8 (patch) | |
tree | 63798ba264407989f87e2043a248a8bfc48fbb47 /src/dotty/tools/dotc/core/Definitions.scala | |
parent | 4611bdf0972fc01dfdfa647a0e84e3bccf98ea05 (diff) | |
download | dotty-3eab4101f516ececde15df74ca382a9fd7018fa8.tar.gz dotty-3eab4101f516ececde15df74ca382a9fd7018fa8.tar.bz2 dotty-3eab4101f516ececde15df74ca382a9fd7018fa8.zip |
Removed annotations forced by union types
Removed annotations from the dotty codebase that were necessary because the inferred union types
caused inference errors later on.
Diffstat (limited to 'src/dotty/tools/dotc/core/Definitions.scala')
-rw-r--r-- | src/dotty/tools/dotc/core/Definitions.scala | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/dotty/tools/dotc/core/Definitions.scala b/src/dotty/tools/dotc/core/Definitions.scala index 22e308062..a58bfc058 100644 --- a/src/dotty/tools/dotc/core/Definitions.scala +++ b/src/dotty/tools/dotc/core/Definitions.scala @@ -286,8 +286,9 @@ class Definitions { object FunctionType { def apply(args: List[Type], resultType: Type) = FunctionClass(args.length).typeRef.appliedTo(args ::: resultType :: Nil) - def unapply(ft: Type): Option[(List[Type], Type)] = { // Dotty deviation: Type annotation needed because inferred type - // is Some[(List[Type], Type)] | None, which is not a legal unapply type. + def unapply(ft: Type)/*: Option[(List[Type], Type)]*/ = { + // -language:keepUnions difference: unapply needs result type because inferred type + // is Some[(List[Type], Type)] | None, which is not a legal unapply type. val tsym = ft.typeSymbol lazy val targs = ft.argInfos if ((FunctionClasses contains tsym) && |