| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| | |
Fix #1747: Improve error message for Scala/Java type mismatch
|
| | |
|
| | |
|
| |
| |
| |
| | |
Omit the `=>' if a PolyType has a MethodType as result type.
|
|\ \
| | |
| | | |
Don't inline when errors are detected
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Inlining is only well-defined if the body to inline does not
have any errors. We therefore check for errors before we
perform any transformation of trees related to inlining.
The error check is global, i.e. we stop on any error
not just on errors in the code to be inlined. This is a safe
approximation, of course.
|
|\ \ \
| |/ /
|/| | |
Fix #1990: Handle inlining where this proxies change types
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
It turns out that we simply cannot do reliable outer path
computation that fills in the right hand sides of this-proxies
from the types of these proxies. As-seen-from logic can mangle
the types of proxies enough to scramble the necessary information.
What we now do instead is simply count: We record the number
of outer accesses to an outer this in inlineable code, and do the same number
of outer accesses when computing the proxy.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
They are sorted according to the nesting depth of the classes they
represent. This is no necessarily the same as the nesting level of
the symbols of the proxy classes. i1990a.scala shows an example where
the two differ.
|
| | |
| | |
| | |
| | |
| | | |
This shows that the builder pattern can be expressed
with implicit function types.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The new situation in the test was that outer of the inlined method
was `A` but it's as seen from type is a subtype `B`.
We need two fixes:
- Ignore outerSelects in TreeChecker. These are treated as having fixed symbols.
- Adapt the outer-path logic to deal with code that's moved to another context.
|
|\ \ \
| | | |
| | | | |
Remove unused flags
|
| |/ / |
|
|\ \ \
| | | |
| | | | |
Disable tests that require scala-compiler
|
| |/ /
| | |
| | |
| | | |
This is necessary if we ever want to get rid of our dependency on scala-compiler
|
| | |
| | |
| | |
| | |
| | |
| | | |
We cannot assume that the untyped rhs of the bind is a `Typed` tree,
with extractors it might be an `Apply` node, and in general it might
also be a `Parens` node.
|
|/ / |
|
| |
| |
| |
| |
| |
| | |
This is a gross hack to support the need for a $scope
binding when XML literals are created. It should go away
once we phase out XML literals. A library-based
solution should use implicits instead.
|
|/
|
|
|
|
|
|
| |
val definitions and for expressions both distinguish whether
something is a pattern or a variable binding. They no do it
the same way: `ident` or an `ident: type` is a variable binding,
everything else is a pattern. Previously, capitalized idents
were considered as bindings in valdefs but as pattern in fors.
|
|
|
|
|
|
|
|
|
|
| |
* Change 'forward reference extending over the definition' to Message
* Change 'forward reference extending over the definition' to Message
* pesky file should not be included
* Change 'forward reference extending over the definition' to Message (test case)
|
|\
| |
| | |
Fix #1501 - Check trait inheritance condition
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
We need to check a coherence condition between the superclass
of a trait and the superclass of an inheriting class or trait.
|
|\ \
| | |
| | | |
fix #1484: position of while incorrect in debug
|
| | | |
|
| | | |
|
| | | |
|
|\ \ \
| | | |
| | | | |
Fix parsing annotation on function type
|
| |/ / |
|
|/ /
| |
| |
| |
| |
| | |
* Change 'overrides nothing' to report via Message, split into two different messages
* Change 'overrides nothing' to report via Message, split into two different messages
|
|\ \
| | |
| | | |
Fix #1916: fix erasure of implicit xxl closures
|
| | |
| | |
| | |
| | | |
This commit extends the fix done in #1920 to implicit closures.
|
|\ \ \
| | | |
| | | | |
Fix #1907: Improve error message
|
| | | |
| | | |
| | | |
| | | | |
Updated with SI issues reported by Jason
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
It seems in most cases this leads to weird behavior and cause
confusing error messages later.
It also means we cannot create an Array[Nothing], except by
passing the classtag explicitly.
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | | |
The test exercises all the improvements made in previous
commits of this branch.
|
|\ \ \ \
| | | | |
| | | | | |
Better positions for infix operations
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Preserving the position of infix operators is useful for IDEs'
type-at-point. We also preserve the position of the untyped lhs of
right-associative operators, this is useful both for IDEs and for error
messages, before:
4 |val x: List[Int] = "foo" :: List(1)
| ^
| found: String($1$)
| required: Int
|
After:
scala> val x: List[Int] = "foo" :: List(1)
-- [E007] Type Mismatch Error: <console> ---------------------------------------
4 |val x: List[Int] = "foo" :: List(1)
| ^^^^^
| found: String($1$)
| required: Int
|
Note: It would be even nicer if we displayed "String" instead of
"String($1$)" since $1$ is synthetic, this commit does not address this.
|
| | |/ /
| |/| |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This has two advantages:
- We can distinguish BackquotedIdent from Ident, allowing the user to
use a defined "type `&`", see testcase.
- We get better positions for the operators. This is useful in IDEs, for
example to get the type at point.
|
|\ \ \ \
| |_|_|/
|/| | | |
Fix to wildapprox
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Prompted by a discussion on the Scala reddit, this one
verified that dotty does not have the problem exhibited
in SI-10170. I piggyback on this PR because this does
not warrant a separate PR>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
f-bounded-case-class.scala exhibited a StackOverflow in wildApprox before
the fixes. The problem was due to F-bounds.
Note: wildApprox is performance critical. I ran timed-bootstrap-repeated
a couple of times to verify that the changes did not affect runtimes in
significant ways. We should also watch out for a slowdown in the
benchmark tests.
|
| | | | |
|
| |/ /
|/| |
| | |
| | |
| | | |
The test exercises all the improvements made in previous
commits of this branch.
|
|\ \ \
| | | |
| | | | |
Fix #1568 - avoid transforming error trees
|
| |/ /
| | |
| | |
| | |
| | | |
If a tree has type error, subtrees may not have an assigned type.
Therefore we should avoid transforming such trees.
|
|\ \ \
| |/ /
|/| | |
Fix #1569: Fix logic for by-name parameters of inline methods
|