aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorGuillaume Martres <smarter@ubuntu.com>2016-08-09 22:54:59 -0700
committerGuillaume Martres <smarter@ubuntu.com>2016-08-09 23:35:53 -0700
commit4b3dce64270144cc4227452ca71d4ceff2a05555 (patch)
tree07ba909dbb0ae247775f9fc1f4d135afd017a235 /tests
parent62348dea92476f1bbb9d7f163f168be9c7e189b5 (diff)
downloaddotty-4b3dce64270144cc4227452ca71d4ceff2a05555.tar.gz
dotty-4b3dce64270144cc4227452ca71d4ceff2a05555.tar.bz2
dotty-4b3dce64270144cc4227452ca71d4ceff2a05555.zip
Fix #1447: Make X$ <:< X.type when X is an object
This allows objects to be easily aliased
Diffstat (limited to 'tests')
-rw-r--r--tests/pos/i1447.scala10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/pos/i1447.scala b/tests/pos/i1447.scala
new file mode 100644
index 000000000..661fc3917
--- /dev/null
+++ b/tests/pos/i1447.scala
@@ -0,0 +1,10 @@
+case object X
+
+object Test {
+ val Alias = X
+
+ val x: X.type = Alias
+
+ type Alias = X.type
+ val a: Alias = Alias
+}