diff options
author | Adriaan Moors <adriaan.moors@typesafe.com> | 2012-12-06 11:51:27 -0800 |
---|---|---|
committer | Adriaan Moors <adriaan.moors@typesafe.com> | 2012-12-06 11:51:27 -0800 |
commit | b1cb6578bdbdfaa66d3cf09f40dfc1511f7e9711 (patch) | |
tree | 3db1756fa8f6f6d482ea08ff4e36a7c568fa478a /test | |
parent | d64f99f7aaa988cd3e975993f88e6a96e1c16c21 (diff) | |
parent | ff9cfd9eb7f47be69d302f73de08a00303249a0d (diff) | |
download | scala-b1cb6578bdbdfaa66d3cf09f40dfc1511f7e9711.tar.gz scala-b1cb6578bdbdfaa66d3cf09f40dfc1511f7e9711.tar.bz2 scala-b1cb6578bdbdfaa66d3cf09f40dfc1511f7e9711.zip |
Merge pull request #1697 from retronym/ticket/6745-2
Don't return unimportables from importedSymbol.
Diffstat (limited to 'test')
-rw-r--r-- | test/files/run/t6745-2.scala | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/test/files/run/t6745-2.scala b/test/files/run/t6745-2.scala new file mode 100644 index 0000000000..31ecd42bd1 --- /dev/null +++ b/test/files/run/t6745-2.scala @@ -0,0 +1,22 @@ +import scala.tools.nsc._ +import scala.tools.partest.CompilerTest +import scala.collection.{ mutable, immutable, generic } + +object Test extends CompilerTest { + import global._ + import rootMirror._ + import definitions._ + import global.analyzer.{Context, ImportInfo} + + override def code = """ +package context { +} + """ + + def check(source: String, unit: global.CompilationUnit) = { + val context: Context = global.analyzer.rootContext(unit) + val importInfo: ImportInfo = context.imports.head // Predef._ + val importedSym = importInfo.importedSymbol(nme.CONSTRUCTOR) + assert(importedSym == NoSymbol, importedSym) // was "constructor Predef" + } +} |