What does <% operator mean in Scala generics?

Possible duplicate:
What are the scala context and view boundaries?

In specs2, there is the Around method described here , which has the following example:

 object http extends Around { def around[T <% Result](t: =>T) = openHttpSession("test") { t // execute t inside a http session } } 

The source of this code can be found here .

I am wondering what the <% operator means in this context?

EDIT: here is a solid answer on this topic, What are the boundaries of Scala's context and visibility?

+4
source share
1 answer

This is an estimate. This means that type T must be converted to type Result . For more information on type boundaries, I recommend you http://www.cs.uwaterloo.ca/~brecht/courses/702/Possible-Readings/scala/ProgrammingInScala.pdf starting on page 61.

+2
source

All Articles