Skip to content

Commit

Permalink
Update _overviews/scala3-migration/incompat-type-inference.md
Browse files Browse the repository at this point in the history
Co-authored-by: Sébastien Doeraene <[email protected]>
  • Loading branch information
bishabosha and sjrd authored Jun 25, 2024
1 parent 408e8bb commit d975244
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion _overviews/scala3-migration/incompat-type-inference.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,9 @@ val foo = new {
{% endtab %}
{% endtabs %}

However the Scala 3 compiler does not infer structural types by default, and so infers type `Object` for `foo`, rather than `{ def bar: Unit }` as in Scala 2.13, so the following structural selection fail to compile:
However the Scala 3 compiler does not infer structural types by default.
It infers the type `Object` for `foo` instead of `{ def bar: Unit }`.
Therefore, the following structural selection fails to compile:

{% tabs use_structural %}
{% tab 'Scala 3 Only' %}
Expand Down

0 comments on commit d975244

Please sign in to comment.