-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Make REPL type echo-ing use partially qualified names where made possible by imports #24850
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,5 @@ | ||
| scala> import scala.quoted._ | ||
| scala> def foo(expr: Expr[Any])(using Quotes) = expr match { case '{ $x: t } => '{ $x: Any } } | ||
| def foo | ||
| (expr: scala.quoted.Expr[Any]) | ||
| (using x$2: scala.quoted.Quotes): scala.quoted.Expr[Any] | ||
| def foo(expr: Expr[Any])(using x$2: Quotes): Expr[Any] | ||
| scala> def bar(expr: Expr[Any])(using Quotes) = expr match { case '{ $x: t } => '{ val a: t = ??? ; ???} } | ||
| def bar | ||
| (expr: scala.quoted.Expr[Any]) | ||
| (using x$2: scala.quoted.Quotes): scala.quoted.Expr[Nothing] | ||
| def bar(expr: Expr[Any])(using x$2: Quotes): Expr[Nothing] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,9 @@ | ||
| scala> import collection.mutable._ | ||
| scala> val buf = new ListBuffer[Int] | ||
| val buf: scala.collection.mutable.ListBuffer[Int] = ListBuffer() | ||
| val buf: ListBuffer[Int] = ListBuffer() | ||
| scala> buf += 22 | ||
| val res0: scala.collection.mutable.ListBuffer[Int] = ListBuffer(22) | ||
| val res0: ListBuffer[Int] = ListBuffer(22) | ||
| scala> buf ++= List(1, 2, 3) | ||
| val res1: scala.collection.mutable.ListBuffer[Int] = ListBuffer(22, 1, 2, 3) | ||
| val res1: ListBuffer[Int] = ListBuffer(22, 1, 2, 3) | ||
| scala> buf.toList | ||
| val res2: List[Int] = List(22, 1, 2, 3) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| scala> collection.mutable.Buffer() | ||
| val res0: collection.mutable.Buffer[Nothing] = ArrayBuffer() | ||
| scala> import collection.mutable | ||
| scala> mutable.Buffer() | ||
| val res1: mutable.Buffer[Nothing] = ArrayBuffer() | ||
| scala> import collection.mutable.ArrayBuffer | ||
| scala> ArrayBuffer(1, 2, 3) | ||
| val res2: ArrayBuffer[Int] = ArrayBuffer(1, 2, 3) | ||
| scala> import collection.mutable.{Buffer => B} | ||
| scala> B() | ||
| val res3: B[Nothing] = ArrayBuffer() |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,6 +5,6 @@ var y: Int = 2 | |
| scala> val xs = List(1) | ||
| val xs: List[Int] = List(1) | ||
| scala> scala.util.Try(1) | ||
| val res0: scala.util.Try[Int] = Success(1) | ||
| val res0: util.Try[Int] = Success(1) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should we maybe show the full path when no import was added? This comes from the defaults, but might be confusing, since we also have java.util
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. But Java.util and any other util package is likely not imported
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I write code like
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's likely my personal preference then 😅 Maybe not important
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I often wonder if |
||
| scala> Map(1 -> "one") | ||
| val res1: Map[Int, String] = Map(1 -> one) | ||
Uh oh!
There was an error while loading. Please reload this page.