| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| | |
Fixes of GADTs and test recategorization.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Passing tests from pending/pos go in pos. Some others
go in diabled/not-testable. These are tests that require
a compilation order which we cannot yet do with our unit
testing framework. Compiling them alltogether (as is now
doen in junit) does not work either for them because they
contain a duplicate class.
|
|/ |
|
|\
| |
| | |
Add dottydoc
|
| | |
|
|/
|
|
| |
Needs to be done in pos-special because junit tests do not recognize _1, _2.
|
|
|
|
|
|
| |
Needs to read several input lines at once.
Enables repl test of new error messages.
|
|\
| |
| | |
partest: Enable separate compilation
|
| |
| |
| |
| |
| |
| |
| |
| | |
Some java tests require the scala-library to be present on the
classpath, this fixes tests/pos/java-interop/{t1186, t1235, t1254,
t1642}.
Also correctly redirect the output of javac so that it will be displayed
by partest --verbose
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
partest can separately compile files based on their suffix (_1, _2,
...), it turns out that this feature was never enabled in the dotty
version of partest and no one noticed (it prints warnings in
./tests/partest-generated/gen.log which no one reads), tests with *.java
files should be compiled both with javac and dotty, but compiling with
javac was also disabled.
Enabling this revealed some latent bugs that will be fixed in the next
few commits.
|
|/
|
|
|
| |
Dotty uses ammonite.terminal since April (53bd25f) which replaces JLine.
There is no reason to keep it anymore.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Faced with recursive dependencies through self types, we might have
to apply `normalizeToClassRefs` to a class P with a parent that is not
yet initialized (witnessed by P's parents being Nil). In that case
we should still execute forwardRefs on P, but we have to
wait in a suspension until P is initialized.
This avoids the problem raised in #1401. I am still not quite sure
why forwardRefs is needed, but it seems that asSeenFrom alone is not
enough to track the dependencies in this case.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Interestingly, adding
mutable.BufferLike
to the whitelist succeeds under junit but fails under partest. Unfortunately I can't see
any output in the log indicating what went wrong. I only see this:
!! 306 - pos/compileStdLib [compilation failed]
# Failed test paths (this command will update checkfiles)
test/partest --update-check \
/Users/odersky/workspace/dotty/tests/partest-generated/pos/compileStdLib
|
|
|
|
| |
This should have been done in a PR that was merged before.
|
|
|
|
| |
Error messages were suppressed so far, now get printed.
|
|\
| |
| | |
Implement -Yno-predef and -Yno-imports
|
| |
| |
| |
| |
| |
| | |
* Implement flags -Yno-predef and -Yno-imports
* Add unit tests for both
|
|\ \
| | |
| | | |
Direct representation of higher-kinded types
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We cannot handle such types in general. So we now check that a hk application
C[args]
where some of the arguments are wildcards does not have as a supertype
a hk application
([X] -> B)[args]
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
- compileMixed failed because there was a cycle between immutable.Seq (compiled) and
parallel.ParSeq (loaded from classfile). Inspection of the completion log (turn completions
Printer on) and the stack trace showed that there's nothing we can do here. The old hk scheme
did not go into the cycle because it did not force an unrelated type. I believe with enough
tweaking we would also hva egotten a cycle in the old hk scheme.
The test is "fixed" by adding parallel.ParSeq to the files to compile.
- Disable named parameter tests
Those tests do not work yet with the revised hk scheme.
Before trying to fix this, we should first decide what parts of
named parameters should be kept.
|
|/ / |
|
| |
| |
| |
| |
| |
| |
| | |
partest adds a warning in a comment at the beginning of source files
that it copies, but this means that every line number displayed in a
stack trace is offset by 6. We can workaround this by making the warning
a single line with no newline at the end.
|
|/ |
|
|
|
|
|
| |
Previously we returned an empty Reporter with no errors so partest
reported the test as a success.
|
|\
| |
| | |
Fix stdout redirect for REPL's println
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
To test this with sbt, see
https://github.com/lampepfl/dotty/wiki/Using-Dotty-with-sbt
The following flags are added:
- -Yforce-sbt-phases: Run the phases used by sbt for incremental compilation
(ExtractDependencies and ExtractAPI) even if the compiler is ran outside of
sbt, for debugging.
- -Ydump-sbt-inc: For every compiled foo.scala, output the API
representation and dependencies used for sbt incremental compilation
in foo.inc, implies -Yforce-sbt-phases.
This commit introduces two new phases which do not transform trees:
- `ExtractDependencies` which extracts the dependency information of the current
compilation unit and sends it to sbt via callbacks
- `ExtractAPI` which creates a representation of the API of the current compilation
unit and sends it to sbt via callbacks
Briefly, when a file changes sbt will recompile it, if its API has
changed (determined by what `ExtractAPI` sent) then sbt will determine
which reverse-dependencies (determined by what `ExtractDependencies`
sent) of the API have to be recompiled depending on what changed.
See http://www.scala-sbt.org/0.13/docs/Understanding-Recompilation.html for
more information on how sbt incremental compilation works.
This phase was originally based on
https://github.com/adriaanm/scala/tree/sbt-api-consolidate/src/compiler/scala/tools/sbt
which attempts to integrate the sbt phases into scalac (and is itself based
on https://github.com/sbt/sbt/tree/0.13/compile/interface/src/main/scala/xsbt),
but it has been heavily refactored and adapted to Dotty. The main
functional differences are:
- ExtractDependencies runs right after Frontend (so that we don't lose
dependency informations because of the simplifications done by PostTyper),
but ExtractAPI runs right after PostTyper (so that SuperAccessors are
part of the API).
- `ExtractAPI` only extract types as they are defined and never "as seen
from" some some specific prefix, see its documentation for more details.
- `ExtractDependenciesTraverser` and `ExtractUsedNames` have been fused into
one tree traversal in `ExtractDependenciesCollector`.
TODO: Try to run these phases in parallel with the rest of the compiler
pipeline since they're independent (except for the sbt callbacks in `GenBCode`) ?
|
|\ \
| | |
| | | |
Add bytecode checking infrastructure
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Annotated values are encapsulated in a `ConcreteAnnotation`, as such,
the statement `tpe isRef defn.IntClass` would yield false despite the
annotated reference being an Int.
The tpe is now unwrapped if it has an annotation. If the transformation
fails despite having the annotation the compiler will warn.
|
| | | |
|
| |/ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
To make tests pass, this required a looser specification of
`assumedCanEquals`, so that an abstract type T can be compared to
arbitrary values, as long as its upper bound can be compared. E.g.
T == null
T == "abc"
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Compare selected contravariant arguments as if they were covariant.
Which ones is explained in the doc comment for method `isAsSpecificValueType`
in Applications.scala.
This has the same motivation than what @paulp proposed around 2012. The solution is a bit
different from the one proposed then because it only affects top-level parameters.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The previous additional test messed up partest in that file Types.scala
was copied twice into the partest-generated directory and then the
pos/core tests would compile both copies. This gave a double definition
which manifested itself under -Yno-double-bindings as an assertion error.
Ideally, partest generation would guard against this situation. For now I avoid
the problem by compiling the whole of core without -Ycheck, not jst Types.scala.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
During an attempted dotty bootstrap it was noted that Types.scala did not compile
anymore, because `checkUnique` threw a `TypeError` during erasure. The issue was an
overloaded member `name` in TermrefWithSig. In NamedType:
def name: Name
In TermRef:
def name: TermName
Before erasure, there's one member `name`, after erasure there are two (because after
erasure result type counts). The error arose when trying to recompute a member
of a `TermRefWithSig` where the name is `name` and the expected signature is `(Nil, ?)`.
Since there are two members that match the name and the signature, `checkUnique`
triggered a `TypeError`. Before adding `checkUnique`, the previous `atSignature`
call would just have returned an arbitrary choice among the two alternative definitions
of `name`.
The fix is not to use `checkUnique` but to fall back to `d.current` in the case where
several alternatives appear.
Interestingly, the failure only triggers when -Ycheck options are *disabled*. I added a new
test that compiles Types.scala without checks, so we catch this and possibly similar bugs
in the future.
|
|/ |
|
| |
|
|
|
|
|
| |
Since we decided to go with the non dotty-scanner approach these are
unnecessary to have altered, might just as well revert them.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
One was implemted by hand and the other by using dotty's parser. The one
built by hand is shorter, and behaves correctly.
The scanner one is unfortunately not ready for testing - there are too
many things that are workarounds for it to be a good solution as of now
The code added from Ammonite is licensed under MIT, not sure where to
put the license - but will add it once I know.
|
|\
| |
| | |
Fix Tasty errors
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
1) Move passing test to pickling
2) Add test case for #1212 in pending
3) Disable annotations/internal in pickling tests. They lead to a stable symbol error
which is explainable (modifiers are read before symbol is created).
|
| | |
|
| | |
|
| |
| |
| |
| | |
This commit also adds a printer for use by dottydoc.
|