diff options
Diffstat (limited to 'test/files/pos/bug112606A.scala')
-rw-r--r-- | test/files/pos/bug112606A.scala | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/test/files/pos/bug112606A.scala b/test/files/pos/bug112606A.scala new file mode 100644 index 0000000000..5bf532f8dd --- /dev/null +++ b/test/files/pos/bug112606A.scala @@ -0,0 +1,25 @@ +package test; +trait Test { + trait Global { + type Tree; + def get : Tree; + } + trait TreeBuilder { + val global : Global; + def set(tree : global.Tree) = {} + } + val nsc : Global; + trait FileImpl { + object treeBuilder extends TreeBuilder { + val global : nsc.type = nsc; + } + // ok + treeBuilder.set(nsc.get); + } + val file0 : FileImpl; + // ok + file0.treeBuilder.set(nsc.get); + def file : FileImpl; + // type mismatch + file.treeBuilder.set(nsc.get); +} |