Skip to content

Fatal warnings #608

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

Merged
merged 5 commits into from
Oct 22, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions scripts/run-tut.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@

COURSIER_CLASSPATH="$(./coursier fetch -p com.chuusai:shapeless_2.11:2.3.1 org.scala-lang.modules::scala-xml:1.0.3)"

./coursier launch -r "https://dl.bintray.com/tpolecat/maven/" org.tpolecat:tut-core_2.11:0.4.4 -- . tut-tmp '.*\.md$' -classpath "$COURSIER_CLASSPATH"

./coursier launch -r "https://dl.bintray.com/tpolecat/maven/" org.tpolecat:tut-core_2.11:0.4.4 -- . tut-tmp '.*\.md$' -classpath "$COURSIER_CLASSPATH" -Xfatal-warnings -feature
6 changes: 4 additions & 2 deletions tutorials/tour/implicit-conversions.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Implicit conversions are applied in two situations:
* If an expression `e` is of type `S`, and `S` does not conform to the expression's expected type `T`.
* In a selection `e.m` with `e` of type `T`, if the selector `m` does not denote a member of `T`.

In the first case, a conversion `c` is searched for which is applicable to `e` and whose result type conforms to `T`.
In the first case, a conversion `c` is searched for which is applicable to `e` and whose result type conforms to `T`.
In the second case, a conversion `c` is searched for which is applicable to `e` and whose result contains a member named `m`.

The following operation on the two lists xs and ys of type `List[Int]` is legal:
Expand All @@ -33,7 +33,7 @@ implicit def list2ordered[A](x: List[A])
(implicit elem2ordered: A => Ordered[A]): Ordered[List[A]] =
new Ordered[List[A]] { /* .. */ }

implicit def int2ordered(x: Int): Ordered[Int] =
implicit def int2ordered(x: Int): Ordered[Int] =
new Ordered[Int] { /* .. */ }
```

Expand All @@ -42,6 +42,8 @@ The implicitly imported object `scala.Predef` declares several predefined types
For example, when calling a Java method that expects a `java.lang.Integer`, you are free to pass it a `scala.Int` instead. That's because Predef includes the following implicit conversions:

```tut
import scala.language.implicitConversions

implicit def int2Integer(x: Int) =
java.lang.Integer.valueOf(x)
```
Expand Down