aboutsummaryrefslogtreecommitdiff
path: root/test/test/sigtest.sc
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2013-04-05 16:55:34 +0200
committerMartin Odersky <odersky@gmail.com>2013-04-05 16:55:34 +0200
commit7736cfb8ff8f5fafee87eb094f15627f4f097165 (patch)
tree601135fdb0c0fac1ba1061f3f4fe8502e6805bad /test/test/sigtest.sc
parent4ce196d8152f75163edb362fcd21fb37631b7fde (diff)
downloaddotty-7736cfb8ff8f5fafee87eb094f15627f4f097165.tar.gz
dotty-7736cfb8ff8f5fafee87eb094f15627f4f097165.tar.bz2
dotty-7736cfb8ff8f5fafee87eb094f15627f4f097165.zip
More tests in worksheets.
Diffstat (limited to 'test/test/sigtest.sc')
-rw-r--r--test/test/sigtest.sc17
1 files changed, 10 insertions, 7 deletions
diff --git a/test/test/sigtest.sc b/test/test/sigtest.sc
index 44fa4f110..ed3793f1c 100644
--- a/test/test/sigtest.sc
+++ b/test/test/sigtest.sc
@@ -13,19 +13,22 @@ object sigtest extends DottyTest {
//| (TypeRef(ThisType(module class scala),Int)), TypeRef(ThisType(module class s
//| cala),Unit))
intmeth.signature //> res1: dotty.tools.dotc.core.Denotations.Signature = List(Int)
- val arraymeth = methType("x")(defn.ArrayType.appliedTo(int.symbolicRef))()
- //> arraymeth : dotty.tools.dotc.core.Types.MethodType = MethodType(List(x), Li
+ val arr = defn.ArrayType.appliedTo(int.symbolicRef)
+ //> arr : dotty.tools.dotc.core.Types.Type = RefinedType(TypeRef(ThisType(modul
+ //| e class scala),Array), scala$Array$$T, TypeAlias(TypeRef(ThisType(module cla
+ //| ss scala),Int)) | hash = 1907214242)
+ val arraymeth = methType("x")(arr)() //> arraymeth : dotty.tools.dotc.core.Types.MethodType = MethodType(List(x), Li
//| st(RefinedType(TypeRef(ThisType(module class scala),Array), scala$Array$$T,
- //| TypeAlias(TypeRef(ThisType(module class scala),Int)) | hash = -634207123)),
+ //| TypeAlias(TypeRef(ThisType(module class scala),Int)) | hash = 1907214242)),
//| TypeRef(ThisType(module class scala),Unit))
- arraymeth.signature //> res2: dotty.tools.dotc.core.Denotations.Signature = List(Object[])
+ arraymeth.signature //> res2: dotty.tools.dotc.core.Denotations.Signature = List(Int[])
val curriedmeth = methType("x", "y")(defn.IntType, defn.BooleanType)(methType("z")(defn.ArrayType.appliedTo(defn.IntType))())
//> curriedmeth : dotty.tools.dotc.core.Types.MethodType = MethodType(List(x, y
//| ), List(TypeRef(ThisType(module class scala),Int), TypeRef(ThisType(module c
//| lass scala),Boolean)), MethodType(List(z), List(RefinedType(TypeRef(ThisType
//| (module class scala),Array), scala$Array$$T, TypeAlias(TypeRef(ThisType(modu
- //| le class scala),Int)) | hash = -250095115)), TypeRef(ThisType(module class s
+ //| le class scala),Int)) | hash = 1808140099)), TypeRef(ThisType(module class s
//| cala),Unit)))
- curriedmeth.signature //> res3: dotty.tools.dotc.core.Denotations.Signature = List(Int, Boolean, Objec
- //| t[])
+ curriedmeth.signature //> res3: dotty.tools.dotc.core.Denotations.Signature = List(Int, Boolean, Int[]
+ //| )
} \ No newline at end of file