diff options
author | Eugene Burmako <xeno.by@gmail.com> | 2014-02-18 09:17:51 +0100 |
---|---|---|
committer | Eugene Burmako <xeno.by@gmail.com> | 2014-02-18 09:17:51 +0100 |
commit | 185de09b79088e83f766d4b60adc896ad01edd31 (patch) | |
tree | be3c8a81e25b2f17a3da2fc8b72835e8d65484de /test | |
parent | 227808c11287fa4cd64afd750a8682d91a90a6e1 (diff) | |
parent | fd623f83a1aa9852b334cd9a1444d10333df1d9a (diff) | |
download | scala-185de09b79088e83f766d4b60adc896ad01edd31.tar.gz scala-185de09b79088e83f766d4b60adc896ad01edd31.tar.bz2 scala-185de09b79088e83f766d4b60adc896ad01edd31.zip |
Merge remote-tracking branch 'retronym/topic/8301' into topic/palladium0
Diffstat (limited to 'test')
-rw-r--r-- | test/files/pos/t8301.scala | 19 | ||||
-rw-r--r-- | test/files/pos/t8301b.scala | 36 |
2 files changed, 55 insertions, 0 deletions
diff --git a/test/files/pos/t8301.scala b/test/files/pos/t8301.scala new file mode 100644 index 0000000000..2d10864c57 --- /dev/null +++ b/test/files/pos/t8301.scala @@ -0,0 +1,19 @@ +trait Universe { + type Symbol >: Null <: AnyRef with SymbolApi + trait SymbolApi + + type TypeSymbol >: Null <: TypeSymbolApi with Symbol + trait TypeSymbolApi + + implicit class CompatibleSymbol(sym: Symbol) { + def asFreeType: TypeSymbol = ??? + } +} + +object Test extends App { + val u: Universe = ??? + import u._ + + val sym: Symbol = ??? + sym.asFreeType +} diff --git a/test/files/pos/t8301b.scala b/test/files/pos/t8301b.scala new file mode 100644 index 0000000000..5641547c18 --- /dev/null +++ b/test/files/pos/t8301b.scala @@ -0,0 +1,36 @@ +// cf. pos/t8300-patmat.scala +trait Universe { + type Name >: Null <: AnyRef with NameApi + trait NameApi + + type TermName >: Null <: TermNameApi with Name + trait TermNameApi extends NameApi +} + +object Test extends App { + val u: Universe = ??? + import u._ + + val ScalaName: TermName = ??? + locally { + + ??? match { + case Test.ScalaName => ??? + } + import Test.ScalaName._ + + ??? match { + case ScalaName => ??? + } + import ScalaName._ + + // both the pattern and import led to + // stable identifier required, but SN found. Note that value SN + // is not stable because its type, Test.u.TermName, is volatile. + val SN = ScalaName + ??? match { + case SN => ??? + } + import SN._ + } +} |