Skip to content

Commit

Permalink
Merge pull request #1 from scalacenter/auto-apply-apply-again
Browse files Browse the repository at this point in the history
Apply `auto-apply.md` to the Spec
  • Loading branch information
sjrd committed Apr 28, 2023
2 parents b7ed85b + 28d35c5 commit d1bce3a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions docs/_spec/05-classes-and-objects.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ A member definition ´M´ _matches_ a member definition ´M'´, if ´M´ and ´M

1. Neither ´M´ nor ´M'´ is a method definition.
2. ´M´ and ´M'´ define both monomorphic methods with equivalent argument types.
3. ´M´ defines a parameterless method and ´M'´ defines a method with an empty parameter list `()` or _vice versa_.
3. ´M´ is defined in Java and defines a method with an empty parameter list `()` and ´M'´ defines a parameterless method.
4. ´M´ and ´M'´ define both polymorphic methods with equal number of argument types ´\overline T´, ´\overline T'´ and equal numbers of type parameters ´\overline t´, ´\overline t'´, say, and ´\overline T' = [\overline t'/\overline t]\overline T´.

<!--
Expand Down Expand Up @@ -257,7 +257,7 @@ Another restriction applies to abstract type members:
An abstract type member with a [volatile type](03-types.html#volatile-types) as its upper bound may not override an abstract type member which does not have a volatile upper bound.

A special rule concerns parameterless methods.
If a parameterless method defined as `def ´f´: ´T´ = ...` or `def ´f´ = ...` overrides a method of type ´()T'´ which has an empty parameter list, then ´f´ is also assumed to have an empty parameter list.
If a parameterless method defined as `def ´f´: ´T´ = ...` or `def ´f´ = ...` overrides a method defined in Java of type ´()T'´ which has an empty parameter list, then ´f´ is also assumed to have an empty parameter list.

An overriding method inherits all default arguments from the definition in the superclass.
By specifying default arguments in the overriding method it is possible to add new defaults (if the corresponding parameter in the superclass does not have a default) or to override the defaults of the superclass (otherwise).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ In Scala 3, this idiom is an error.

```scala
next
^
missing arguments for method next
^^^^
method next must be called with () argument
```

In Scala 3, the application syntax has to follow exactly the parameter
Expand Down

0 comments on commit d1bce3a

Please sign in to comment.