Skip to content

Instantly share code, notes, and snippets.

@dhanji
Created April 5, 2013 00:38
Show Gist options
  • Select an option

  • Save dhanji/5315714 to your computer and use it in GitHub Desktop.

Select an option

Save dhanji/5315714 to your computer and use it in GitHub Desktop.
val active: ConcurrentMap[String, Long] = CacheBuilder.newBuilder()
.build[String, Long]()
.asMap()
/**
*
scala: type arguments [String,Long] conform to the bounds of none of the overloaded alternatives of
value build: [K1 <: Object, V1 <: Object]()com.google.common.cache.Cache[K1,V1] <and> [K1 <: Object, V1 <: Object](x$1: com.google.common.cache.CacheLoader[_ >: K1, V1])com.google.common.cache.LoadingCache[K1,V1]
.build[String, Long]()
^
*/
@dhanji
Copy link
Copy Markdown
Author

dhanji commented Apr 5, 2013

If I remove the type parameters to build(), I get this error instead:

scala: inferred type arguments [String,Long] do not conform to method build's type parameter bounds [K1 <: Object,V1 <: Object]
.asMap()
^

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment