diff options
author | Martin Odersky <odersky@gmail.com> | 2014-03-02 12:03:32 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2014-03-02 12:03:56 +0100 |
commit | 0ebdbde3d51f92647f3b1cd452d60648ed8e7a39 (patch) | |
tree | fa8016066b11b10db7f47d9a0a875a8114d28681 /tests | |
parent | cba210d0c362759a710f4d9b5dbf1ecfe0d1f278 (diff) | |
download | dotty-0ebdbde3d51f92647f3b1cd452d60648ed8e7a39.tar.gz dotty-0ebdbde3d51f92647f3b1cd452d60648ed8e7a39.tar.bz2 dotty-0ebdbde3d51f92647f3b1cd452d60648ed8e7a39.zip |
Rename baseType -> baseTypeRef
What was `baseType` and is now `baseTypeRef` only computes the prefix of of basetype, not the type arguments.
If type arguments need to be included there is `baseTypeWithArgs`. The reason is that type arguments are usually already encoded as member types. But this was a source of errors because in Scala 2, baseType includes the type arguements.
(also added test file structural.scala forgotten from last commit)
Diffstat (limited to 'tests')
-rw-r--r-- | tests/pos/structural.scala | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/pos/structural.scala b/tests/pos/structural.scala new file mode 100644 index 000000000..8afa49ed0 --- /dev/null +++ b/tests/pos/structural.scala @@ -0,0 +1,21 @@ +object test123 { + type A = { def a: Int } + def f(a: A): A = a +} + +object structural2 { + type A = { def a: Int } + + type B = { + def b: Int + } + + type AB = A & B + + def f(ab: AB): AB = ab + + f(new { + def a = 43 + def b = 42 + }) +}
\ No newline at end of file |