diff options
Diffstat (limited to 'tests/untried/pos/t6815.scala')
-rw-r--r-- | tests/untried/pos/t6815.scala | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/untried/pos/t6815.scala b/tests/untried/pos/t6815.scala new file mode 100644 index 000000000..9244b3d35 --- /dev/null +++ b/tests/untried/pos/t6815.scala @@ -0,0 +1,17 @@ +trait U { + trait ValOrDefDefApi { + def name: Any + } + type ValOrDefDef <: ValOrDefDefApi + type ValDef <: ValOrDefDef with ValDefApi + trait ValDefApi extends ValOrDefDefApi { this: ValDef => } + val emptyValDef: ValDef // the result type is volatile +} + +object Test { + val u: U = ??? + + u.emptyValDef match { + case u.emptyValDef => // but we shouldn't let that stop us from treating it as a stable identifier pattern. + } +} |