diff options
author | Martin Odersky <odersky@gmail.com> | 2016-10-01 21:51:34 +0200 |
---|---|---|
committer | Guillaume Martres <smarter@ubuntu.com> | 2016-10-11 19:21:02 +0200 |
commit | 25c0398b6f07df2449652e66cef8b6a6d3d4c7ce (patch) | |
tree | 75124ba8ba9d7663b7c6f2b739c55f828406386e /tests/pos/i1045.scala | |
parent | 3d74bfa72bdc794cfb11b6afe15c77a5357617d1 (diff) | |
download | dotty-25c0398b6f07df2449652e66cef8b6a6d3d4c7ce.tar.gz dotty-25c0398b6f07df2449652e66cef8b6a6d3d4c7ce.tar.bz2 dotty-25c0398b6f07df2449652e66cef8b6a6d3d4c7ce.zip |
Adapt tests
Diffstat (limited to 'tests/pos/i1045.scala')
-rw-r--r-- | tests/pos/i1045.scala | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/pos/i1045.scala b/tests/pos/i1045.scala index f5985af92..f0cf1df90 100644 --- a/tests/pos/i1045.scala +++ b/tests/pos/i1045.scala @@ -1,7 +1,24 @@ import scala.collection._ + +object EmptyHashMap extends mutable.HashMap[Nothing, Nothing] object T { val newSymbolMap: mutable.HashMap[String, mutable.HashMap[Int, Double]] = mutable.HashMap.empty val map = newSymbolMap.getOrElse("a", mutable.HashMap.empty) map.put(1, 0.0) newSymbolMap.put("a", map) + + /** A map storing free variables of functions and classes */ +// type SymSet = Set[Symbol] +// private val free = new collection.mutable.LinkedHashMap[Symbol, SymSet] +// def freeVars(sym: Symbol): List[Symbol] = free.getOrElse(sym, Nil).toList + + class Tree[X >: Null] { def tpe: X = null } + class Ident[X >: Null] extends Tree[X] + class Apply[X >: Null] extends Tree[X] + + val x: Ident[Symbol] | Apply[Symbol] = ??? + val y = x.tpe + val z: Symbol = y + + } |