diff options
author | Martin Odersky <odersky@gmail.com> | 2015-04-30 11:30:44 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2015-05-02 19:07:38 +0200 |
commit | 3df53946319d7f6c7af6e0eca757e548b6bc5cef (patch) | |
tree | 0cc0e7807395e2baad1a92cc9c92ca343d11099c /tests | |
parent | 5cd90e5afd73c6f8354d0d3687fb2ee3a9f413e7 (diff) | |
download | dotty-3df53946319d7f6c7af6e0eca757e548b6bc5cef.tar.gz dotty-3df53946319d7f6c7af6e0eca757e548b6bc5cef.tar.bz2 dotty-3df53946319d7f6c7af6e0eca757e548b6bc5cef.zip |
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.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/pos/Patterns.scala | 5 |
1 files changed, 5 insertions, 0 deletions
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 +} |