diff options
author | Martin Odersky <odersky@gmail.com> | 2014-03-17 18:05:57 +0100 |
---|---|---|
committer | Tobias Schlatter <tobias@meisch.ch> | 2014-03-21 11:28:30 +0100 |
commit | 0a1ec31c2a17c5dd0e6bd363979cbf17a8860616 (patch) | |
tree | 7ccdd57d90d231cc11f396f767044809e53d86e8 /tests/pos/t112606A.scala | |
parent | 7820e62e30a63f2b8fd6b8bab8f96be6924a63a1 (diff) | |
download | dotty-0a1ec31c2a17c5dd0e6bd363979cbf17a8860616.tar.gz dotty-0a1ec31c2a17c5dd0e6bd363979cbf17a8860616.tar.bz2 dotty-0a1ec31c2a17c5dd0e6bd363979cbf17a8860616.zip |
Fix of t112606A - path dependent types
Needed an extra case in isSubType.
Diffstat (limited to 'tests/pos/t112606A.scala')
-rw-r--r-- | tests/pos/t112606A.scala | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/pos/t112606A.scala b/tests/pos/t112606A.scala new file mode 100644 index 000000000..5bf532f8d --- /dev/null +++ b/tests/pos/t112606A.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); +} |