diff options
Diffstat (limited to 'tests/pos/t6815_import.scala')
-rw-r--r-- | tests/pos/t6815_import.scala | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/pos/t6815_import.scala b/tests/pos/t6815_import.scala new file mode 100644 index 000000000..56f4358d5 --- /dev/null +++ b/tests/pos/t6815_import.scala @@ -0,0 +1,16 @@ +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 = ??? + + // but we shouldn't let that stop us from treating it as a stable identifier for import + import u.emptyValDef.name +} |