diff options
author | Martin Odersky <odersky@gmail.com> | 2013-11-22 18:12:42 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2013-11-22 18:12:42 +0100 |
commit | 9e1bf7743355de040a23fbcfe9b1efb9b1db1789 (patch) | |
tree | c12488e5c5756bccfcf34ff3407c696b0e543b54 /test | |
parent | 3d98269f2db2542373f76f519fd3643b7bcf75cf (diff) | |
download | dotty-9e1bf7743355de040a23fbcfe9b1efb9b1db1789.tar.gz dotty-9e1bf7743355de040a23fbcfe9b1efb9b1db1789.tar.bz2 dotty-9e1bf7743355de040a23fbcfe9b1efb9b1db1789.zip |
Renaming: typeConstructor -> typeRef
Diffstat (limited to 'test')
-rw-r--r-- | test/test/baseTypetest.sc | 25 | ||||
-rw-r--r-- | test/test/denotTest.sc | 68 | ||||
-rw-r--r-- | test/x/xplore.sc | 98 |
3 files changed, 95 insertions, 96 deletions
diff --git a/test/test/baseTypetest.sc b/test/test/baseTypetest.sc index 350e503aa..001f1e3b3 100644 --- a/test/test/baseTypetest.sc +++ b/test/test/baseTypetest.sc @@ -8,20 +8,19 @@ import Types._, Symbols._ object baseTypetest extends DottyTest { println("Welcome to the Scala worksheet") //> Welcome to the Scala worksheet val int = defn.IntType //> int : dotty.tools.dotc.core.Types.Type = TypeRef(ThisType(module class scal - //| a),Int) - int.baseClasses //> res0: List[dotty.tools.dotc.core.Symbols.ClassSymbol] = List(class Int, clas - //| s AnyVal, class NotNull, class Any) - defn.StringClass.typeConstructor.baseClasses //> res1: List[dotty.tools.dotc.core.Symbols.ClassSymbol] = List(class String, c - //| lass CharSequence, class Comparable, class Serializable, class Object, class - //| Any) - defn.StringClass.typeConstructor.baseType(defn.ObjectClass) - //> res2: dotty.tools.dotc.core.Types.Type = TypeRef(ThisType(module class lang) - //| ,Object) - defn.StringClass.typeConstructor.baseType(defn.AnyClass) - //> res3: dotty.tools.dotc.core.Types.Type = TypeRef(ThisType(module class scala - //| ),Any) + //| a#35),Int) + int.baseClasses //> res0: List[dotty.tools.dotc.core.Symbols.ClassSymbol] = List(class Int#1364, + //| class AnyVal#575, class Any#2133) + defn.StringClass.typeRef.baseClasses //> res1: List[dotty.tools.dotc.core.Symbols.ClassSymbol] = List(class String#21 + //| 3, class CharSequence#531, class Comparable#102, class Serializable#3816, cl + //| ass Object#129, class Any#2133) + defn.StringClass.typeRef.baseType(defn.ObjectClass) + //> res2: dotty.tools.dotc.core.Types.Type = TypeRef(ThisType(module class lang# + //| 57),Object) + defn.StringClass.typeRef.baseType(defn.AnyClass)//> res3: dotty.tools.dotc.core.Types.Type = TypeRef(ThisType(module class scala + //| #35),Any) defn.StringClass isSubClass defn.NullClass //> res4: Boolean = false - defn.StringClass.typeConstructor.baseType(defn.NullClass) + defn.StringClass.typeRef.baseType(defn.NullClass) //> res5: dotty.tools.dotc.core.Types.Type = NoType }
\ No newline at end of file diff --git a/test/test/denotTest.sc b/test/test/denotTest.sc index 939c51c01..222a347b6 100644 --- a/test/test/denotTest.sc +++ b/test/test/denotTest.sc @@ -8,48 +8,48 @@ import Types._, Symbols._ object denotTest extends DottyTest { println("Welcome to the Scala worksheet") //> Welcome to the Scala worksheet - val str = defn.StringClass.typeConstructor //> str : dotty.tools.dotc.core.Types.TypeRef = TypeRef(ThisType(module class l - //| ang),String) + val str = defn.StringClass.typeRef //> str : dotty.tools.dotc.core.Types.TypeRef = TypeRef(ThisType(module class l + //| ang#57),String) val d= str.member("getBytes".toTermName) //> d : dotty.tools.dotc.core.Denotations.Denotation = val getBytes <and> val g //| etBytes <and> val getBytes <and> val getBytes d.alternatives //> res0: List[dotty.tools.dotc.core.Denotations.SingleDenotation] = List(val ge //| tBytes, val getBytes, val getBytes, val getBytes) d.alternatives.map(_.info) //> res1: List[dotty.tools.dotc.core.Types.Type] = List(JavaMethodType(List(), L - //| ist(), RefinedType(TypeRef(ThisType(module class scala),Array), scala$Array$ - //| $T, TypeAlias(TypeRef(ThisType(module class scala),Byte)) | hash = 777673561 - //| )), JavaMethodType(List(x$0), List(TypeRef(ThisType(module class charset),Ch - //| arset)), RefinedType(TypeRef(ThisType(module class scala),Array), scala$Arra - //| y$$T, TypeAlias(TypeRef(ThisType(module class scala),Byte)) | hash = 7776735 - //| 61)), JavaMethodType(List(x$0), List(TypeRef(ThisType(module class lang),Str - //| ing)), RefinedType(TypeRef(ThisType(module class scala),Array), scala$Array$ - //| $T, TypeAlias(TypeRef(ThisType(module class scala),Byte)) | hash = 777673561 - //| )), JavaMethodType(List(x$0, x$1, x$2, x$3), List(TypeRef(ThisType(module cl - //| ass scala),Int), TypeRef(ThisType(module class scala),Int), RefinedType(Type - //| Ref(ThisType(module class scala),Array), scala$Array$$T, TypeAlias(TypeRef(T - //| hisType(module class scala),Byte)) | hash = 777673561), TypeRef(ThisType(mod - //| ule class scala),Int)), TypeRef(ThisType(module class scala),Unit))) - val sm = defn.StringClass.companionModule //> sm : dotty.tools.dotc.core.Symbols.Symbol = module String + //| ist(), RefinedType(TypeRef(ThisType(module class scala#35),Array), scala$Arr + //| ay$$T, TypeAlias(TypeRef(ThisType(module class scala#35),Byte)))), JavaMetho + //| dType(List(x$0), List(TypeRef(ThisType(module class charset#5432),Charset)), + //| RefinedType(TypeRef(ThisType(module class scala#35),Array), scala$Array$$T, + //| TypeAlias(TypeRef(ThisType(module class scala#35),Byte)))), JavaMethodType( + //| List(x$0), List(TypeRef(ThisType(module class lang#57),String)), RefinedType + //| (TypeRef(ThisType(module class scala#35),Array), scala$Array$$T, TypeAlias(T + //| ypeRef(ThisType(module class scala#35),Byte)))), JavaMethodType(List(x$0, x$ + //| 1, x$2, x$3), List(TypeRef(ThisType(module class scala#35),Int), TypeRef(Thi + //| sType(module class scala#35),Int), RefinedType(TypeRef(ThisType(module class + //| scala#35),Array), scala$Array$$T, TypeAlias(TypeRef(ThisType(module class s + //| cala#35),Byte))), TypeRef(ThisType(module class scala#35),Int)), TypeRef(Thi + //| sType(module class scala#35),Unit))) + val sm = defn.StringClass.companionModule //> sm : dotty.tools.dotc.core.Symbols.Symbol = module String#214 val d2 = sm.info.member("valueOf".toTermName) //> d2 : dotty.tools.dotc.core.Denotations.Denotation = val valueOf <and> val v //| alueOf <and> val valueOf <and> val valueOf <and> val valueOf <and> val value //| Of <and> val valueOf <and> val valueOf <and> val valueOf d2.alternatives.map(_.info) //> res2: List[dotty.tools.dotc.core.Types.Type] = List(JavaMethodType(List(x$0) - //| , List(TypeRef(ThisType(module class scala),Double)), TypeRef(ThisType(modul - //| e class lang),String)), JavaMethodType(List(x$0), List(TypeRef(ThisType(modu - //| le class scala),Float)), TypeRef(ThisType(module class lang),String)), JavaM - //| ethodType(List(x$0), List(TypeRef(ThisType(module class scala),Long)), TypeR - //| ef(ThisType(module class lang),String)), JavaMethodType(List(x$0), List(Type - //| Ref(ThisType(module class scala),Int)), TypeRef(ThisType(module class lang), + //| , List(TypeRef(ThisType(module class scala#35),Double)), TypeRef(ThisType(mo + //| dule class lang#57),String)), JavaMethodType(List(x$0), List(TypeRef(ThisTyp + //| e(module class scala#35),Float)), TypeRef(ThisType(module class lang#57),Str + //| ing)), JavaMethodType(List(x$0), List(TypeRef(ThisType(module class scala#35 + //| ),Long)), TypeRef(ThisType(module class lang#57),String)), JavaMethodType(Li + //| st(x$0), List(TypeRef(ThisType(module class scala#35),Int)), TypeRef(ThisTyp + //| e(module class lang#57),String)), JavaMethodType(List(x$0), List(TypeRef(Thi + //| sType(module class scala#35),Char)), TypeRef(ThisType(module class lang#57), //| String)), JavaMethodType(List(x$0), List(TypeRef(ThisType(module class scala - //| ),Char)), TypeRef(ThisType(module class lang),String)), JavaMethodType(List( - //| x$0), List(TypeRef(ThisType(module class scala),Boolean)), TypeRef(ThisType( - //| module class lang),String)), JavaMethodType(List(x$0, x$1, x$2), List(Refine - //| dType(TypeRef(ThisType(module class scala),Array), scala$Array$$T, TypeAlias - //| (TypeRef(ThisType(module class scala),Char)) | hash = 2075434073), TypeRef(T - //| hisType(module class scala),Int), TypeRef(ThisType(module class scala),Int)) - //| , TypeRef(ThisType(module class lang),String)), JavaMethodType(List(x$0), Li - //| st(RefinedType(TypeRef(ThisType(module class scala),Array), scala$Array$$T, - //| TypeAlias(TypeRef(ThisType(module class scala),Char)) | hash = 2075434073)), - //| TypeRef(ThisType(module class lang),String)), JavaMethodType(List(x$0), Lis - //| t(TypeRef(ThisType(module class scala),Any)), TypeRef(ThisType(module class - //| lang),String))) + //| #35),Boolean)), TypeRef(ThisType(module class lang#57),String)), JavaMethodT + //| ype(List(x$0, x$1, x$2), List(RefinedType(TypeRef(ThisType(module class scal + //| a#35),Array), scala$Array$$T, TypeAlias(TypeRef(ThisType(module class scala# + //| 35),Char))), TypeRef(ThisType(module class scala#35),Int), TypeRef(ThisType( + //| module class scala#35),Int)), TypeRef(ThisType(module class lang#57),String) + //| ), JavaMethodType(List(x$0), List(RefinedType(TypeRef(ThisType(module class + //| scala#35),Array), scala$Array$$T, TypeAlias(TypeRef(ThisType(module class sc + //| ala#35),Char)))), TypeRef(ThisType(module class lang#57),String)), JavaMetho + //| dType(List(x$0), List(TypeRef(ThisType(module class scala#35),Any)), TypeRef + //| (ThisType(module class lang#57),String))) }
\ No newline at end of file diff --git a/test/x/xplore.sc b/test/x/xplore.sc index 53791d933..15b431637 100644 --- a/test/x/xplore.sc +++ b/test/x/xplore.sc @@ -7,64 +7,64 @@ import Decorators._ object xplore { println("Welcome to the Scala worksheet") //> Welcome to the Scala worksheet - val c = Main.newCompiler //> c : dotty.tools.dotc.Compiler = dotty.tools.dotc.Compiler@4ac9131c + val c = Main.newCompiler //> c : dotty.tools.dotc.Compiler = dotty.tools.dotc.Compiler@36ff057f val base = new ContextBase //> base : dotty.tools.dotc.core.Contexts.ContextBase = dotty.tools.dotc.core.C - //| ontexts$ContextBase@72c743eb + //| ontexts$ContextBase@2980f96c implicit val ctx = c.rootContext(base.initialCtx) //> ctx : dotty.tools.dotc.core.Contexts.Context = dotty.tools.dotc.core.Contex - //| ts$InitialContext@4f88f506 - val strClass = defn.StringClass //> strClass : dotty.tools.dotc.core.Symbols.ClassSymbol = class String#207 - strClass.baseClasses //> res0: List[dotty.tools.dotc.core.Symbols.ClassSymbol] = List(class String#20 - //| 7, class CharSequence#525, class Comparable#96, class Serializable#3795, cla - //| ss Object#123, class Any#2112) - strClass.typeConstructor <:< defn.AnyType //> res1: Boolean = true - val predef = defn.PredefModule //> predef : dotty.tools.dotc.core.Symbols.TermSymbol = module Predef#1509 + //| ts$InitialContext@6aadae91 + val strClass = defn.StringClass //> strClass : dotty.tools.dotc.core.Symbols.ClassSymbol = class String#213 + strClass.baseClasses //> res0: List[dotty.tools.dotc.core.Symbols.ClassSymbol] = List(class String#21 + //| 3, class CharSequence#531, class Comparable#102, class Serializable#3816, cl + //| ass Object#129, class Any#2133) + strClass.typeRef <:< defn.AnyType //> res1: Boolean = true + val predef = defn.PredefModule //> predef : dotty.tools.dotc.core.Symbols.TermSymbol = module Predef#1515 val strd = predef.info.member("String".toTypeName) //> strd : dotty.tools.dotc.core.Denotations.Denotation = type String strd.info //> res2: dotty.tools.dotc.core.Types.Type = TypeAlias(TypeRef(ThisType(module c - //| lass lang#51),String)) - val strType = strd.symbol.typeConstructor //> strType : dotty.tools.dotc.core.Types.TypeRef = TypeRef(ThisType(module cla - //| ss Predef$#1510),String) + //| lass lang#57),String)) + val strType = strd.symbol.typeRef //> strType : dotty.tools.dotc.core.Types.TypeRef = TypeRef(ThisType(module cla + //| ss Predef$#1516),String) strType <:< defn.AnyType //> res3: Boolean = true - val prdef = defn.PredefModule //> prdef : dotty.tools.dotc.core.Symbols.TermSymbol = module Predef#1509 + val prdef = defn.PredefModule //> prdef : dotty.tools.dotc.core.Symbols.TermSymbol = module Predef#1515 predef.isCompleted //> res4: Boolean = true predef.info.parents //> res5: List[dotty.tools.dotc.core.Types.TypeRef] = List(TypeRef(ThisType(modu - //| le class scala#29),LowPriorityImplicits), TypeRef(ThisType(module class scal - //| a#29),DeprecatedPredef)) + //| le class scala#35),LowPriorityImplicits), TypeRef(ThisType(module class scal + //| a#35),DeprecatedPredef)) predef.info //> res6: dotty.tools.dotc.core.Types.Type = TypeRef(ThisType(module class scala - //| #29),Predef$) - predef.info.typeSymbol //> res7: dotty.tools.dotc.core.Symbols.Symbol = module class Predef$#1510 - val scala = defn.ScalaPackageClass //> scala : dotty.tools.dotc.core.Symbols.ClassSymbol = module class scala#29 + //| #35),Predef$) + predef.info.typeSymbol //> res7: dotty.tools.dotc.core.Symbols.Symbol = module class Predef$#1516 + val scala = defn.ScalaPackageClass //> scala : dotty.tools.dotc.core.Symbols.ClassSymbol = module class scala#35 scala.info.decl("Predef$".toTypeName) //> res8: dotty.tools.dotc.core.Denotations.Denotation = module class Predef$ - predef.info.decls //> res9: dotty.tools.dotc.core.Scopes.Scope = Scopes(val <init>#4952, val class - //| Of#4953, type Class#4954, type String#4957, type Function#4958, type Map#496 - //| 1, type Set#4964, val Map#4966, val Map #4967, val Set#4968, val Set #4969, - //| type ClassManifest#4970, type OptManifest#4972, type Manifest#4974, val Clas - //| sManifest#4976, val ClassManifest #4977, val Manifest#4978, val Manifest #49 - //| 79, val NoManifest#4980, val NoManifest #4981, val manifest#4982, val classM - //| anifest#4985, val optManifest#4988, val identity#4991, val implicitly#4994, - //| val locally#4997, val error#5000, val assert#5002, val assert#5004, val assu - //| me#5007, val assume#5009, val require#5012, val require#5014, val $qmark$qma - //| rk$qmark#5017, type Pair#5018, module Pair#5021, type Triple#5033, module Tr - //| iple#5037, class ArrowAssoc#5052, val ArrowAssoc#5067, class Ensuring#5070, - //| val Ensuring#5089, class StringFormat#5092, val StringFormat#5103, class Str - //| ingAdd#5106, val StringAdd#5117, class RichException#5120, val RichException - //| #5129, class SeqCharSequence#5131, val SeqCharSequence#5143, class ArrayChar - //| Sequence#5145, val ArrayCharSequence#5157, val StringCanBuildFrom#5159, val - //| StringCanBuildFrom #5160, val augmentString#5161, val unaugmentString#5163, - //| val print#5165, val println#5167, val println#5168, val printf#5170, val tup - //| le2ToZippedOps#5173, val tuple3ToZippedOps#5177, val genericArrayOps#5182, v - //| al booleanArrayOps#5185, val byteArrayOps#5187, val charArrayOps#5189, val d - //| oubleArrayOps#5191, val floatArrayOps#5193, val intArrayOps#5195, val longAr - //| rayOps#5197, val refArrayOps#5199, val shortArrayOps#5202, val unitArrayOps# - //| 5204, val byte2Byte#5206, val short2Short#5208, val char2Character#5210, val - //| int2Integer#5212, val long2Long#5214, val float2Float#5216, val double2Doub - //| le#5218, val boolean2Boolean#5220, val Byte2byte#5222, val Short2short#5224, - //| val Character2char#5226, val Integer2int#5228, val Long2long#5230, val Floa - //| t2float#5232, val Double2double#5234, val Boolean2boolean#5236, class $less$ - //| colon$less#5238, val singleton_$less$colon$less#5243, val conforms#5244, cla - //| ss $eq$colon$eq#5246, val singleton_$eq$colon$eq#5251, module $eq$colon$eq#5 - //| 252, class DummyImplicit#5258, module DummyImplicit#5260, module RichExcepti - //| on#5264, module StringAdd#5274, module StringFormat#5288, module Ensuring#53 - //| 02, module ArrowAssoc#5330) + predef.info.decls //> res9: dotty.tools.dotc.core.Scopes.Scope = Scopes(val <init>#4979, val class + //| Of#4980, type Class#4981, type String#4984, type Function#4985, type Map#498 + //| 8, type Set#4991, val Map#4993, val Map #4994, val Set#4995, val Set #4996, + //| type ClassManifest#4997, type OptManifest#4999, type Manifest#5001, val Clas + //| sManifest#5003, val ClassManifest #5004, val Manifest#5005, val Manifest #50 + //| 06, val NoManifest#5007, val NoManifest #5008, val manifest#5009, val classM + //| anifest#5012, val optManifest#5015, val identity#5018, val implicitly#5021, + //| val locally#5024, val error#5027, val assert#5029, val assert#5031, val assu + //| me#5034, val assume#5036, val require#5039, val require#5041, val $qmark$qma + //| rk$qmark#5044, type Pair#5045, module Pair#5048, type Triple#5060, module Tr + //| iple#5064, class ArrowAssoc#5079, val ArrowAssoc#5094, class Ensuring#5097, + //| val Ensuring#5116, class StringFormat#5119, val StringFormat#5130, class Str + //| ingAdd#5133, val StringAdd#5144, class RichException#5147, val RichException + //| #5156, class SeqCharSequence#5158, val SeqCharSequence#5170, class ArrayChar + //| Sequence#5172, val ArrayCharSequence#5184, val StringCanBuildFrom#5186, val + //| StringCanBuildFrom #5187, val augmentString#5188, val unaugmentString#5190, + //| val print#5192, val println#5194, val println#5195, val printf#5197, val tup + //| le2ToZippedOps#5200, val tuple3ToZippedOps#5204, val genericArrayOps#5209, v + //| al booleanArrayOps#5212, val byteArrayOps#5214, val charArrayOps#5216, val d + //| oubleArrayOps#5218, val floatArrayOps#5220, val intArrayOps#5222, val longAr + //| rayOps#5224, val refArrayOps#5226, val shortArrayOps#5229, val unitArrayOps# + //| 5231, val byte2Byte#5233, val short2Short#5235, val char2Character#5237, val + //| int2Integer#5239, val long2Long#5241, val float2Float#5243, val double2Doub + //| le#5245, val boolean2Boolean#5247, val Byte2byte#5249, val Short2short#5251, + //| val Character2char#5253, val Integer2int#5255, val Long2long#5257, val Floa + //| t2float#5259, val Double2double#5261, val Boolean2boolean#5263, class $less$ + //| colon$less#5265, val singleton_$less$colon$less#5270, val conforms#5271, cla + //| ss $eq$colon$eq#5273, val singleton_$eq$colon$eq#5278, module $eq$colon$eq#5 + //| 279, class DummyImplicit#5285, module DummyImplicit#5287, module RichExcepti + //| on#5291, module StringAdd#5301, module StringFormat#5315, module Ensuring#53 + //| 29, module ArrowAssoc#5357) }
\ No newline at end of file |