| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| | | |
|
| | |
| | |
| | |
| | |
| | | |
- rename utility methods
- generate utility methods also for object cases
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | | |
Infer type arguments for enum paraments from corresponding type
parameter bounds. This only works if the type parameter in question
is variant and its bound is ground.
|
| | |
| | |
| | |
| | |
| | | |
Previous expansion caused 3 spurious follow-on errors which are now
avoided.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Support cases with type parameters that implicitly extend a non-parameterized base
without needing their own extends clause. The proposal has been updated to make clear
that this is supported.
Also address other reviewers comments.
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Based on the discussion in #1970, enumeration objects now
have three public members:
- valueOf: Map[Int, E]
- withName: Map[String, E]
- values: Iterable[E]
Also, the variance of case type parameters is now
the same as in the corresponding type parameter of
the enum class.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
In an enum case like
case C() extends P1 with ... with Pn ...
apply now returns `P1 & ... & Pn`, where before
it was just P1.
Also, add to Option test.
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Flags like Trait are in fact not always defined when a symbol
is created. For symbols loaded from class files, this flag, and
some other is defined only once the classfile has been loaded.
But this happens in general before the symbol is completed.
We model this distinction by separating from the `FromStartFlags` set
a new set `AfterLoadFlags` and distinguishing between the two sets
in `SymDenotations#is`.
Test case is enum-Option.scala. This erroneously complained before
that `Enum` was not a trait.
|
| | | |
|
| | |
| | |
| | |
| | | |
These are now implemented in scala.runtime.
|
| | | |
|
| | | |
|
| |/ |
|
|\ \
| | |
| | | |
Fix #2024: TypeApply can be a final apply of a recursive method.
|
| | | |
|
| | | |
|
| |/
|/|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
`checkNoPrivateLeaks` can force a lot of things, this lead to
hard-to-reproduce issues in unpickling because we called
`checkNoPrivateLeaks` on the type parameters of a class before anything
in the class was indexed. We fix this by making sure that
`checkNoPrivateLeaks` never transforms type symbols, only term symbols,
therefore we can unpickle type parameters without forcing too many
things. tests/neg/leak-type.scala illustrates the new restriction that
this necessitates.
|
|\ \
| | |
| | | |
Fix #1959: infix type operators in the REPL
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Infix type operators were broken in the REPL.
The REPL uses fold methods from the untpd package,
but those were skipping the operator subtree when folding
over an InfixOp.
Fix the issue by taking the operator into account.
Tested:
1) Verified that only the REPL code uses the modified
fold method.
2) Added repl test.
|
|\ \ \
| | | |
| | | | |
Make case class hashCode take class into account
|
| |\ \ \ |
|
| | | | |
| | | | |
| | | | |
| | | | | |
Also, update check file.
|
|\ \ \ \ \
| | |/ / /
| |/| | | |
|
| |\ \ \ \
| | |_|/ /
| |/| | | |
Fix #2151: don't die for wrong number of typeargs applied
|
| | |/ / |
|
|/ / / |
|
|/ / |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
|\ \
| | |
| | | |
Fix #2137: Create dummy companions for top-level objects without a real one
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Previously, we sometimes ended up forcing a companion class symbol from
a previous run or from the classpath which lead to weird issues like in
`false-companion`. Even if we end up not forcing such a symbol, its
presence can still lead to issue: before this commit incremental
compilation of `dotty-compiler-bootstrapped` was broken because we
recorded a false dependency on the non-bootstrapped `dotty-compiler`
jar.
The added test is currently marked pending because it does not work with
JUnit (which doesn't handle separate compilation), only partest. I
didn't managed to get it to work right, and this won't be necessary once
our testing framework is overhauled by
https://github.com/lampepfl/dotty/pull/2125 anyway, so I'll just have to
remember to enable this test afterwards.
|
|\ \ \
| | | |
| | | | |
Fix desugaring of variable pattern leaking into API
|
| | | |
| | | |
| | | |
| | | |
| | | | |
This was especially bad for incremental compilation since the temporary
variable name is unstable.
|
| |/ /
|/| |
| | |
| | |
| | |
| | |
| | | |
* Fix varargs in methods (Issue: #1625)
* Fix minor comments
* Change varargs parameter message
* Fix failed test, fix case for constructor
|
| | | |
|
|/ / |
|
|\ \
| | |
| | | |
Fixed #2086: Add tests for issue that has already been fixed.
|
| | | |
|
|\ \ \
| |/ /
|/| | |
Fixed #1573: Add tests for fixed issue.
|
| | | |
|
|\ \ \
| |/ /
|/| | |
Fix #2117: bug in typechecking super prefix with invalid enclosing class
|