~ubuntu-branches/debian/sid/scala/sid

« back to all changes in this revision

Viewing changes to test/files/run/constrained-types.check

  • Committer: Package Import Robot
  • Author(s): Emmanuel Bourg, Mehdi Dogguy, Lucas Satabin, Frank S. Thomas, Emmanuel Bourg
  • Date: 2015-06-05 23:52:59 UTC
  • mfrom: (1.2.11)
  • Revision ID: package-import@ubuntu.com-20150605235259-wk00vgk83dh8o19g
Tags: 2.10.5-1
* Team upload.

[ Mehdi Dogguy ]
* New upstream release (Closes: #744278).

[ Lucas Satabin ]
* Update patches
* Update the clean target
* Update paths of elements to install
* Update watch file

[ Frank S. Thomas ]
* Remove myself from Uploaders.

[ Emmanuel Bourg ]
* The package has been adopted by the Java Team (Closes: #754935)
* Patched the build to avoid downloading libraries from the Internet
* Replaced the minified JavaScript files with unobfuscated ones
* No longer build scala-partest.jar until diffutils is packaged or replaced
* debian/watch: Fixed the versions matched (x.y.z instead of x.y.z..z)
* debian/rules:
  - Added the missing get-orig-source target (Closes: #724704)
  - Improved the clean target
* debian/control:
  - Build depend on scala (>= 2.10) and bnd
  - Use canonical URLs for the Vcs-* fields
  - Standards-Version updated to 3.9.6 (no changes)
* Switch to debhelper level 9

Show diffs side-by-side

added added

removed removed

Lines of Context:
66
66
scala> 
67
67
 
68
68
scala> val three = "three"
69
 
three: java.lang.String = three
 
69
three: String = three
70
70
 
71
71
scala> val three2 = m(three:three.type)  // should change x to three
72
72
three2: String @Annot(three) = three
73
73
 
74
74
scala> var four = "four"
75
 
four: java.lang.String = four
 
75
four: String = four
76
76
 
77
77
scala> val four2 = m(four) // should have an existential bound
78
 
four2: java.lang.String @Annot(x) forSome { val x: java.lang.String } = four
 
78
warning: there were 1 feature warning(s); re-run with -feature for details
 
79
four2: String @Annot(x) forSome { val x: String } = four
79
80
 
80
81
scala> val four3 = four2   // should have the same type as four2
81
 
four3: java.lang.String @Annot(x) forSome { val x: java.lang.String } = four
 
82
warning: there were 1 feature warning(s); re-run with -feature for details
 
83
four3: String @Annot(x) forSome { val x: String } = four
82
84
 
83
85
scala> val stuff = m("stuff") // should not crash
84
86
stuff: String @Annot("stuff") = stuff
100
102
  val y : String @Annot(x) = x
101
103
  y
102
104
} // x should not escape the local scope with a narrow type
103
 
m: java.lang.String @Annot(x) forSome { val x: java.lang.String }
 
105
warning: there were 1 feature warning(s); re-run with -feature for details
 
106
m: String @Annot(x) forSome { val x: String }
104
107
 
105
108
scala> 
106
109
 
113
116
  }
114
117
  m("stuff".stripMargin)
115
118
} // x should be existentially bound
116
 
n: (y: String)java.lang.String @Annot(x) forSome { val x: String }
 
119
warning: there were 1 feature warning(s); re-run with -feature for details
 
120
n: (y: String)String @Annot(x) forSome { val x: String }
117
121
 
118
122
scala> 
119
123
 
130
134
scala> 
131
135
 
132
136
scala> val y = a.x // should drop the annotation
133
 
y: java.lang.String = hello
 
137
y: String = hello
134
138
 
135
139
scala> 
136
140