| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The old algorithm omitted necessary outer ref checks in some places.
This new one is more conservative. It only omits outer ref checks when
the expected type and the scrutinee type match up, or when the expected
type is defined in a static location. For this specific purpose the top
level of a method or other code block (which is not a trait or class
definition) is also considered static because it does not have a prefix.
This change comes with a spec update to clarify the prefix rule for type
patterns. The new wording makes it clear that the presence of a prefix
is to be interpreted in a *semantic* way, i.e. the existence of a prefix
determines the necessity for an outer ref check, no matter if the prefix
is actually spelled out *syntactically*. Note that the old outer ref
check implementation did not use the alternative interpretation of
requiring prefixes to be given syntactically. It never created an outer
ref check for a local class `C`, no matter if the pattern was `_: C`
or `_: this.C`, thus violating both interpretations of the spec.
There is now explicit support for unchecked matches (like
`case _: (T @unchecked) =>`) to suppress warnings for unchecked outer
refs. `@unchecked` worked before and was used for this purpose in
`neg/t7721` but never actually existed as a feature. It was a result of
a bug that prevented an outer ref check from being generated in the
first place if *any* annotation was used on an expected type in a type
pattern. This new version will still generate the outer ref check if an
outer ref is available but suppress the warning otherwise. Other
annotations on type patterns are ignored.
New tests are in `neg/outer-ref-checks`. The expected results of tests
`neg/t7171` and `neg/t7171b` have changed because the compiler now
tries to generate additional outer ref checks that were not present
before (which was a bug).
|
|\ |
|
| | |
|
| | |
|
|\|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
there were merge conflicts in the Eclipse config that I resolved with
--ours. I invite @performantdata to submit a followup PR bringing the
Eclipse stuff into a good state on 2.12.x.
there was a test failure in
test/junit/scala/collection/mutable/OpenHashMapTest.scala
due to the 2.12 compiler emitting the field backing a
private var differently (with an unmangled name). Lukas
says the difference is expected, so I just updated the
code in the test.
there were no other merge conflicts.
% git log --decorate --oneline -1 origin/2.11.x | cat
ae5f0de (origin/HEAD, origin/2.11.x) Merge pull request #4791 from performantdata/issue/9508
% git log --decorate --oneline -1 origin/2.12.x | cat
c99e53e (HEAD -> 2.12.x, origin/2.12.x) Merge pull request #4797 from lrytz/M3-versions
% export MB=$(git merge-base 2.12.x origin/2.11.x)
% echo $MB
42cafa21f3c4a08c6dd34608278f810b6ec2886f
% git log --graph --oneline --decorate $MB...origin/2.11.x | cat
* ae5f0de (origin/HEAD, origin/2.11.x) Merge pull request #4791 from performantdata/issue/9508
|\
| * 08dca37 (origin/pull/4791) SI-9508 fix classpaths in Eclipse configuration
* | fe76232 Merge pull request #4798 from performantdata/issue/9513
|\ \
| * | 9c97a7f (origin/pull/4798) Suppress unneeded import.
| * | 30d704d Document some OpenHashMap internal methods.
| * | 1fb32fc SI-9513 decrement "deleted" count in OpenHashMap.put() when slot reused
| |/
* | 14f875c Merge pull request #4788 from dk14/patch-1
|\ \
| * | 42acd55 (origin/pull/4788) explicitly specify insertion-order feature in docs
| /
* | 68ce049 Merge pull request #4771 from som-snytt/issue/9492-here
|\ \
| * | f290962 (origin/pull/4771) SI-9492 Line trimming paste
| * | bc3589d SI-9492 REPL paste here doc
| /
* | 9834fc8 Merge pull request #4610 from todesking/spec-implicits-remove-obsolete
|\ \
| * | 46009b1 (origin/pull/4610) Add view/context-bound parameter ordering rule
| * | 6eba305 Spec: Implicit parameters with context/view bound is allowed since 2.10
| /
* | d792e35 Merge pull request #4789 from janekdb/2.11.x-param-names-predicates-operations
|\ \
| |/
|/|
| * b19a07e (origin/pull/4789) Rename forall, exists and find predicate and operator params.
|/
* 648c7a1 Merge pull request #4790 from SethTisue/issue/9501
|\
| * 40d12f1 (origin/pull/4790) SI-9501 link README to Scala Hacker Guide
* e0b5891 Merge pull request #4786 from performantdata/issue/9506
* 39acad8 (origin/pull/4786) SI-9506 suppress Scala IDE-generated files in the Eclipse project dirs
* 74dc364 SI-9506 suppress Scala IDE-generated files in the Eclipse project dirs
% git merge ae5f0de
Auto-merging src/repl/scala/tools/nsc/interpreter/ILoop.scala
Auto-merging src/library/scala/util/Either.scala
Auto-merging src/library/scala/runtime/Tuple3Zipped.scala
Auto-merging src/library/scala/runtime/Tuple2Zipped.scala
Auto-merging src/library/scala/collection/parallel/ParIterableLike.scala
Auto-merging src/library/scala/collection/immutable/ListMap.scala
Auto-merging src/library/scala/collection/TraversableLike.scala
Auto-merging src/eclipse/test-junit/.classpath
CONFLICT (content): Merge conflict in src/eclipse/test-junit/.classpath
Auto-merging src/eclipse/scaladoc/.classpath
CONFLICT (content): Merge conflict in src/eclipse/scaladoc/.classpath
Auto-merging src/eclipse/scala-compiler/.classpath
Auto-merging src/eclipse/repl/.classpath
CONFLICT (content): Merge conflict in src/eclipse/repl/.classpath
Auto-merging src/eclipse/partest/.classpath
CONFLICT (content): Merge conflict in src/eclipse/partest/.classpath
Auto-merging src/eclipse/interactive/.classpath
Auto-merging README.md
Automatic merge failed; fix conflicts and then commit the result.
% git checkout --ours src/eclipse/partest/.classpath
% git checkout --ours src/eclipse/repl/.classpath
% git checkout --ours src/eclipse/scaladoc/.classpath
% git checkout --ours src/eclipse/test-junit/.classpath
% git add -u
% emacs test/junit/scala/collection/mutable/OpenHashMapTest.scala
% git diff test/junit/scala/collection/mutable/OpenHashMapTest.scala | cat
...
- val field = m.getClass.getDeclaredField("scala$collection$mutable$OpenHashMap$$deleted")
+ val field = m.getClass.getDeclaredField("deleted")
...
% git add -u
|
| |\
| | |
| | | |
Spec: Implicit parameters with context/view bound is allowed since 2.10
|
| | | |
|
| | | |
|
|\| | |
|
| | | |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
only trivial merge conflicts here.
not dealing with PR #4333 in this merge because there is a substantial
conflict there -- so that's why I stopped at
63daba33ae99471175e9d7b20792324615f5999b for now
|
|\ \ \
| |/ /
|/| | |
SI-6810 Disallow EOL in char literal
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Emphasize that literal parsing accepts Unicode escapes
as if they were escaped. In particular, a newline
represented by its Unicode escape does not terminate
the line in the middle of a literal.
|
| |/
|/|
| |
| |
| | |
now that https://github.com/vmg/redcarpet/issues/494 is fixed
we don't need to stay pinned to an outdated version anymore
|
| | |
|
|\ \
| |/
|/| |
Traits mistakenly set as 'Case Classes' subsection
|
| |
| |
| |
| |
| | |
Instead of being its own section, a minor formatting issue causes 'Traits' to be rendered and numbered as a subsection of the section 'Case Classes'.
This patch changes the numbering on both 'Traits' and 'Object Definitions' sections.
|
|/ |
|
|\
| |
| | |
Fix missing quotes in EBNF of type alias
|
| | |
|
|\ \
| | |
| | | |
spec: Add 'Default Arguments' heading, sentence, example
|
| |/
| |
| |
| | |
The sentence and the accompanying example were stolen from SID-1.
|
|/
|
|
| |
The definition now specifically mentions that C is an element of the
inheritance closure of C.
|
| |
|
|\
| |
| | |
fix typo
|
| | |
|
|/
|
|
|
|
|
|
|
| |
I checked the intent with Martin, who said:
> [...] qualified private members are inherited like other members,
> it’s just that their access is restricted.
I've locked this in with a test as well.
|
|
|
|
|
| |
These rules were removed in #2244 and scala.NotNull itself was
deprecated.
|
| |
|
| |
|
|
|
| |
Avoid spurious italics...
|
|\
| |
| | |
fix definition of TRY in the language specification
|
| | |
|
|\ \
| |/
|/| |
Update 03-types.md
|
| |
| |
| | |
Using U_i instead of T_i is confusing. See http://stackoverflow.com/questions/26803244/is-this-a-typo-in-the-scala-language-specification-on-parameterized-types
|
|\ \
| |/
|/| |
Fix many typos in docs and comments
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This commit corrects many typos found in scaladocs, comments and
documentation. It should reduce a bit number of PRs which fix one
typo.
There are no changes in the 'real' code except one corrected name of
a JUnit test method and some error messages in exceptions. In the case
of typos in other method or field names etc., I just skipped them.
Obviously this commit doesn't fix all existing typos. I just generated
in IntelliJ the list of potential typos and looked through it quickly.
|
|\ \
| |/
|/| |
SI-7965 Support calls to MethodHandle.{invoke,invokeExact}
|
| | |
|
|\ \
| | |
| | | |
spec: Add a link to the sources from the main page
|
| |/ |
|
| | |
|
| | |
|
|/
|
|
|
|
| |
The original PR was partially applied to markdown.
https://github.com/scala/scala-dist/pull/103
|
|
|
| |
Missing closing curly brace as reported by Andre at https://groups.google.com/forum/#!topic/scala-language/4Zb6dc6EEFM.
|
|
|
| |
Reverted the claimed result values of the example in the section on repeated parameters and changed the code of the example method instead.
|
|
|
| |
Changed "in" to "by the".
|
|
|
| |
Changed two wrong plurals to singulars, and inserted a comma in an enumeration of alternatives before the last "or".
|