diff options
author | Guillaume Martres <smarter@ubuntu.com> | 2017-02-17 17:33:19 +0100 |
---|---|---|
committer | Guillaume Martres <smarter@ubuntu.com> | 2017-02-17 17:33:19 +0100 |
commit | 75dcc47f99cb1bdcdd1aac99be0182ddda3b5a16 (patch) | |
tree | c7c0bc9a06f64b74f6ac27b63053fc586c546827 /tests | |
parent | 80511914713237de894f896da7397965e52134a7 (diff) | |
download | dotty-75dcc47f99cb1bdcdd1aac99be0182ddda3b5a16.tar.gz dotty-75dcc47f99cb1bdcdd1aac99be0182ddda3b5a16.tar.bz2 dotty-75dcc47f99cb1bdcdd1aac99be0182ddda3b5a16.zip |
Fix binding of x @ (e: T) in ClassTag-based patmat
We cannot assume that the untyped rhs of the bind is a `Typed` tree,
with extractors it might be an `Apply` node, and in general it might
also be a `Parens` node.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/run/i1991.scala | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/run/i1991.scala b/tests/run/i1991.scala index 524a3f311..cec1dec89 100644 --- a/tests/run/i1991.scala +++ b/tests/run/i1991.scala @@ -10,6 +10,15 @@ class A[Foo](implicit tag: ClassTag[Foo]) { //case foo: Foo => true case _ => false } + + def testBind(x: Any) = x match { + case foo0: Foo => + (foo0: Foo) + case foo1 @ (_: Foo) => + (foo1: Foo) + case foo2 @ ExtractFoo() => + (foo2: Foo) + } } object Test { |