| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
- allow inline as an alternative to final for vals
(final is retained for backwards compatibility for now)
- allow inline for parameters
- check that rhs of inline value has a constant type
- check that arguments to inline value parameters have constant type
- check that inline members are not deferred
- make inline members effectively final
|
|
|
|
|
|
|
| |
`inline` is now a modifier keyword. To keep disruption tolerable,
we still allow `@inline` as an annotation as well. Other uses of
`inline` are supported only under `-language:Scala2` and are rewritten
to identifiers in backticks.
|
|
|
|
| |
Thicket has a vararg constructor, so this syntax is redundant.
|
|
|
|
|
|
| |
Roll its functionality into Select. Since we can always
tell whether a tree is a type or term there is no expressiveness
gained by having a separate tree node.
|
|
|
|
|
|
|
|
| |
Drop tree node class 'Pair'. It was used only in imports, where
it can easily be replaced by Thicket.
The envisaged use for generic pairs is almost sure better modelled
by a "Pair" class in Dotty's standard library.
|
| |
|
|
|
|
|
|
| |
That way, we can check functions for the ordering requirement as well.
We only have to remember that the last parameter of a wildcard function
does not precede its body (because the parameter is in fact part of the body).
|
|
|
|
| |
Arrange its sub-elements so that they appear strictly left to right.
|
|
|
|
|
|
|
|
|
| |
Now it's annotated first, annotation second.
This is in line with AnnotatedType and in line with the principle
that tree arguments should come in the order they are written. The
reason why the order was swapped before is historical - Scala2 did it
that way.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In particular:
- get rid of envelope, it's too complicated and hides too many errors
- check that everywhere in parsed trees the position range of a parent
node contains the position ranges of its children.
- check that all non-empty trees coming from parser have positions.
The commit contains lots of fixes to make these checks pass.
In particular, it changes the scheme how definitions are positioned.
Previously the position of a definition was the token range of the
name defined by it. That does obviously not work with the parent/children
invariant. Now, the position is the whole definition range, with the
point at the defined name (care is taken to not count backticks).
Namer is changed to still use the token range of defined name as the
position of the symbol.
|
|
|
|
|
| |
Code inspection revealed that it did the wrong thing for annotated trees,
looking in the annotation instead of in the argument.
|
| |
|
| |
|
| |
|
|
|
|
| |
Remove debug info from error message.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Allow hk type parameters to be higher kinded themselves.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There was a special case that triggered a parse error in this course
def lift[T <: Type](tp: T): (RecType => T) = arg match {
case rt0: RecType => tp.subst(rt0, _).asInstanceOf[T]
case _ => (x => tp)
}
The problem was that the rhs of the first case became a Function node, which
caused a premature return from the case clause sequence. I could not determine
anymore what the purpose of the removed case in the parser was; all tests compile
without it.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit fixes errors that would've occurred in this situation:
```
/** Docstring 1 */ <- this one would've been chosen
/** Docstring 2 */
/** Docstring 3 */
class Class
```
And this situation:
```
/** Docstring 1 */
trait Trait
/** Docstring 2 */ <- this one would've been chosen
```
|
| |
|
| |
|
| |
|
| |
|
|\
| |
| | |
better positioning of `_*` not last argument error
|
| |
| |
| |
| |
| | |
The error should be at the beginning of the underscore `_`,
not the next token after the star `*`, which is the default.
|
|/
|
|
|
|
|
|
|
|
|
|
| |
The standard syntax in Dotty now is `xs : _*`. In Scala2 mode,
following code should be valid:
list match {
case List(_, _, _, _ @ _*) => 0
case List(_, _, _*) => 1
case List(_, _: _*) => 2
case Nil => 3
}
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A constructor
def this() { ... }
needs to be rewritten to
def this() = { ... }
not to
def this(): Unit = { ... }
|
|
|
|
|
| |
No more leaking ofMove PatchedFiles in a settings option. Move all
patch classes into a `Rewrites` object.
|
|
|
|
|
| |
Firs version of patching that can be invoked by dotty compiler
itself.
|
|
|
|
| |
Lets one also pass named arguments to methods.
|
| |
|
|
|
|
|
| |
Changes needed to support simple named type parameters.
Not yet implemented: named arguments.
|
|
|
|
|
|
| |
It's not correct to just add `=` you also need to specify the return
type to be `Unit` otherwise things may not work as expected, this is
especially important for a `main` method.
|
| |
|
| |
|