Skip to content

Fix type test for trait parameter arguments #12064

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 64 commits into from

Conversation

odersky
Copy link
Contributor

@odersky odersky commented Apr 12, 2021

Backport of #12041

liufengyun and others added 30 commits March 29, 2021 13:51
The symbol might have original name in scope other than its current
target name (after erasure).
Propagate visited set properly.
Fix detecting Scala3 version in useScaladoc
Deprecate sbt-dotty when using sbt >= 1.5.0-RC2
Fix scala#11731: Remove symbols with targetName correctly
Fix scala#11885: disable flaky idempotency test on Windows
Performance tweak for initialization check
```code
@main def Test =
  val x = false
  val y = 1
  val result =
    x
    || y.match
        case 1 => false
        case 3 => false
        case _ => true
    || !x
  assert(result)
```
In this code, the last `|| !x` was seen as a part of the previous case, so the code was parsed as
```scala
@main def Test =
  val x = false
  val y = 1
  val result =
    x
    || y.match
        case 1 => false
        case 3 => false
        case _ => true || !x
  assert(result)
```
This is highly surprising and unintuitive. The fix will insert an <outdent> token instead
if the leading infix operator is too far to the left. Too far means: (1) left of the current indentation
region, (2) and not to the right of any outer indentation widths.

(2) allows to still parse code like this
```scala
if xyz then
    one
  + two
  + three
```
Here, the width of the indentation region after `then` is 4, but the `+` operator is to the right
of the outer indentation width of 0., so the indentation region is not closed. In other words,
we do not close an indentation region if the result would not be legal, since it matches none of
the previous indentation widths.
Fix scala#9871: use toNestedPairs in provablyDisjoint
Fix typo in idempotency test filter
smarter and others added 28 commits April 2, 2021 01:23
CI: Automatically open an issue if nightly build fails
…erator

Better handling of leading infix operators in indented code
Fix treatment of bottom types in OrType#join and baseType computations
Fix type NamedArg of annotations when pt is nullable
Fix bug with doubling comments in Scaladoc
…c2-features

Add handling for scaladoc 2 flags: private, groups, author, canonical doc url, project footer.
We cannot pull the try that catches the type error over both parts of
`tryExtensionOrConversion` since a failed extension should still cause
a conversion to be tried. We need to try both parts separately instead.
Better error message for errors arising from implicit completions
Allow by-name types in using clauses
 - Concentrate everything in Checking -- it's too easy to add flag checking
   in several places otherwise.
 - Simplify some operations
Revert "Recursively check nonvariant arguments of base types for realizability"
…aware-of-experiments

Make community build docs experiment-aware
@odersky odersky closed this Apr 12, 2021
@odersky odersky deleted the fix-11993 branch April 13, 2021 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.