Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8964849
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T16:40:48+00:00 2026-06-15T16:40:48+00:00

In another answer here they give the following code example: scala> implicitly[Int => {

  • 0

In another answer here they give the following code example:

scala> implicitly[Int => { def min(i: Int): Any }]
res22: (Int) => AnyRef{def min(i: Int): Any} = <function1>

That doesn’t work in my scala console (2.10.0-RC2).

scala> implicitly[Int => { def min(i: Int): Any }]
<console>:8: error: No implicit view available from Int => AnyRef{def min(i: Int): Any}.
          implicitly[Int => { def min(i: Int): Any }]
                    ^
scala> 12 min 11
res15: Int = 11

What is the new way to do it? And what does that syntax mean anyway? I’m not familiar with it — specifically the part { def min(i: Int): Any }, used as a type expression. Is that defining an anonymous type of some kind?

I want to do this because I’d like to track down an implicit conversion when I see it in code and have no idea where it is imported from. For example, the other day I saw some code that was calling format on a java.util.Date, which doesn’t have format. I didn’t know which import pulled in the conversion.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T16:40:50+00:00Added an answer on June 15, 2026 at 4:40 pm

    You’re not going to find min because RichInt is a value class now (which doesn’t work with structural typing–that has to be an AnyRef).

    But the strategy will work otherwise:

    scala> implicitly[Option[Int] => { def iterator: Iterator[Int] }]
    res29: Option[Int] => AnyRef{def iterator: Iterator[Int]} = <function1>
    

    So the same trick will work, just not with value classes. Try an IDE instead.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

After getting a helpful answer here , I have run into yet another problem:
I have a answer to another guy question here How to count string occurrence
I have read an answer to another question here on Stack Overflow. Let me
I got an answer to another question here: DB Schema For Chats? It's a
I have checked other questions here at SO, however they do not answer my
Another answer shows how to set a default timestamp . However, it updates only
From another answer on Stackoverflow is a conversion from Javascript date to .net DateTime:
I've just read this snippet from another answer : When you create a block
EDIT : Accepted answer points out what my issue was. I added another answer
I was trying to answer another question about polymorphism vs sharing when I stumbled

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.