From 3df53946319d7f6c7af6e0eca757e548b6bc5cef Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Thu, 30 Apr 2015 11:30:44 +0200 Subject: Make sure types of pattern bound variables are fully-defined. Like all other variables, pattern-bound vars need a fully defined type. I was thinking originally that demanding a fully defined selector type is sufficient to ensure this, but that's not true: An outer pattern might call a polymorphic unapply and its type variables need not be fully instantiated. With the fix, the minimized test case from ExpandSAMs works. --- tests/pos/Patterns.scala | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tests/pos/Patterns.scala') diff --git a/tests/pos/Patterns.scala b/tests/pos/Patterns.scala index e443c2ab5..e9bce87a9 100644 --- a/tests/pos/Patterns.scala +++ b/tests/pos/Patterns.scala @@ -94,3 +94,8 @@ object Patterns { t } } + +object NestedPattern { + val xss: List[List[String]] = ??? + val List(List(x)) = xss +} -- cgit v1.2.3