-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Allow toplevel definitions #5754
Commits on Feb 1, 2019
-
Configuration menu - View commit details
-
Copy full SHA for e17ded1 - Browse repository at this point
Copy the full SHA e17ded1View commit details -
Disallow empty implicit parameter sections
Previously, `given ()` was legal, but it serves no purpose and only complicates things.
Configuration menu - View commit details
-
Copy full SHA for 8201ae1 - Browse repository at this point
Copy the full SHA 8201ae1View commit details -
Parser.syntaxError contains a tweak that underlines the whole span of the current token, if it has a name. Tho make this work reliably we need to reset the name to null when reading a new token, since not every token sets a name.
Configuration menu - View commit details
-
Copy full SHA for 5dd0a11 - Browse repository at this point
Copy the full SHA 5dd0a11View commit details -
Change syntax of implicit function types and closures
It's `given A => B` instead of `A |=> B`.
Configuration menu - View commit details
-
Copy full SHA for 2baba5b - Browse repository at this point
Copy the full SHA 2baba5bView commit details -
# Conflicts: # tests/run-with-compiler-custom-args/tasty-interpreter/interpreter/TastyInterpreter.scala # tests/run-with-compiler-custom-args/tasty-interpreter/interpreter/TreeInterpreter.scala
Configuration menu - View commit details
-
Copy full SHA for f324ea5 - Browse repository at this point
Copy the full SHA f324ea5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 319d874 - Browse repository at this point
Copy the full SHA 319d874View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1c90ec2 - Browse repository at this point
Copy the full SHA 1c90ec2View commit details -
Configuration menu - View commit details
-
Copy full SHA for af796f7 - Browse repository at this point
Copy the full SHA af796f7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1e47e5c - Browse repository at this point
Copy the full SHA 1e47e5cView commit details -
Configuration menu - View commit details
-
Copy full SHA for e792c88 - Browse repository at this point
Copy the full SHA e792c88View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3bc0547 - Browse repository at this point
Copy the full SHA 3bc0547View commit details -
Also: drop some doc pages that are no longer used.
Configuration menu - View commit details
-
Copy full SHA for e2f1299 - Browse repository at this point
Copy the full SHA e2f1299View commit details -
Implied Conversion -> Implicit Conversion
Implied felt forced in this context
Configuration menu - View commit details
-
Copy full SHA for 53f00ae - Browse repository at this point
Copy the full SHA 53f00aeView commit details -
Rename internals to new terminologu
Token: INSTANCE -> IMPLIED Flag: Contextual -> Given
Configuration menu - View commit details
-
Copy full SHA for a1ffafc - Browse repository at this point
Copy the full SHA a1ffafcView commit details -
Configuration menu - View commit details
-
Copy full SHA for c04e041 - Browse repository at this point
Copy the full SHA c04e041View commit details -
Configuration menu - View commit details
-
Copy full SHA for 031532d - Browse repository at this point
Copy the full SHA 031532dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 61564ba - Browse repository at this point
Copy the full SHA 61564baView commit details -
Configuration menu - View commit details
-
Copy full SHA for 359b80f - Browse repository at this point
Copy the full SHA 359b80fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 5b90688 - Browse repository at this point
Copy the full SHA 5b90688View commit details -
Change scheme to name package object wrappers
It's now src$package instead of src#object
Configuration menu - View commit details
-
Copy full SHA for b069f8d - Browse repository at this point
Copy the full SHA b069f8dView commit details -
Configuration menu - View commit details
-
Copy full SHA for ab0ea23 - Browse repository at this point
Copy the full SHA ab0ea23View commit details -
Disallow toplevel statements other than definitions
Have tests for other sorts of definitions
Configuration menu - View commit details
-
Copy full SHA for a105398 - Browse repository at this point
Copy the full SHA a105398View commit details -
Refine condition for printing package objects
AN old-style package object of package `p` printed `package object p`. Since there are now several possible toplevel source files, we can't do the same for toplevel source file. I am not yet quite sure what to do instead. For the moment, we just print the name of the generated object.
Configuration menu - View commit details
-
Copy full SHA for 97f06e0 - Browse repository at this point
Copy the full SHA 97f06e0View commit details -
Detect and report double definitions between toplevel files
Detect and report double definitions between members of different toplevel files. This required a fix in method `precedesIn` for the case where neither owner is part of the checked baseclass sequence. In that case the answer should be `false` but we reported `true`.
Configuration menu - View commit details
-
Copy full SHA for 160fe40 - Browse repository at this point
Copy the full SHA 160fe40View commit details -
Test that an error message is issued for sources in different directories but with the same filename and package. Also: Drop out-of-date ErrorMessageTest
Configuration menu - View commit details
-
Copy full SHA for 0aab6e4 - Browse repository at this point
Copy the full SHA 0aab6e4View commit details -
Configuration menu - View commit details
-
Copy full SHA for e3a24d3 - Browse repository at this point
Copy the full SHA e3a24d3View commit details -
Configuration menu - View commit details
-
Copy full SHA for e9dd68e - Browse repository at this point
Copy the full SHA e9dd68eView commit details -
Configuration menu - View commit details
-
Copy full SHA for a4950d0 - Browse repository at this point
Copy the full SHA a4950d0View commit details -
Configuration menu - View commit details
-
Copy full SHA for be77747 - Browse repository at this point
Copy the full SHA be77747View commit details -
Configuration menu - View commit details
-
Copy full SHA for 560d608 - Browse repository at this point
Copy the full SHA 560d608View commit details -
Configuration menu - View commit details
-
Copy full SHA for f9aff3e - Browse repository at this point
Copy the full SHA f9aff3eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 280744e - Browse repository at this point
Copy the full SHA 280744eView commit details -
Be more careful where we fill in missing companion objects
- There might be several overloaded variants - There might be members with the same name that are not modules. These should be left alone.
Configuration menu - View commit details
-
Copy full SHA for 444cffa - Browse repository at this point
Copy the full SHA 444cffaView commit details -
Generalize member computation for package members
Previously, package-object local definitions won over global ones. It's more systematic to form the union of both. Also, absent dummy modules or classes have to be ignored in order not to poison the union. These changes would have made sense also for old-style package objects, btw.
Configuration menu - View commit details
-
Copy full SHA for e946936 - Browse repository at this point
Copy the full SHA e946936View commit details -
Configuration menu - View commit details
-
Copy full SHA for 67bcab2 - Browse repository at this point
Copy the full SHA 67bcab2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1cb7cb1 - Browse repository at this point
Copy the full SHA 1cb7cb1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 205972c - Browse repository at this point
Copy the full SHA 205972cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 44877bd - Browse repository at this point
Copy the full SHA 44877bdView commit details -
Make toplevel privates package private
This is the only way that avoids tricky special cases. Also: Fix desugaring of toplevel definitions so that imports are visible in wrapper objects.
Configuration menu - View commit details
-
Copy full SHA for 8278568 - Browse repository at this point
Copy the full SHA 8278568View commit details -
Change scheme to widen toplevel private
Doing it while desugaring does not always work since definitions might already have been indexed before desugaring happens, in which case the symbol gets duplicated. We do the widening in Namer instead.
Configuration menu - View commit details
-
Copy full SHA for 572471f - Browse repository at this point
Copy the full SHA 572471fView commit details -
Configuration menu - View commit details
-
Copy full SHA for a789cdd - Browse repository at this point
Copy the full SHA a789cddView commit details -
Revert scala#3735: Allow accesses to private package members from nested
Test case is i3339. In ``` package outer { private class A() { override def toString = "A" } package inner { object Test { def main(args: Array[String]): Unit = { println(new A()) // allow access? } } } } ``` should the access to private class `A` from a nested package be allowed? The usual rules for Scala say yes, since the access is from a nested scope. We changed this to in scala#3735 to "no", since we wanted to emulate Java's default package-private visibility. But this is unsystematic for two reasons: - it breaks the universal meaning of `private` in Scala - it uses a different name (i.e. private) for what is not named in Java at all, and is named `internal` in Kotlin. - it does not generalize to members of classes which could also profit from a Java-package-private visibility specifier. I believe it is better to leave `private` as it is, and, if we want to emulate `internal` (which might be a good idea), introduce a new modifier for it.
Configuration menu - View commit details
-
Copy full SHA for e81f52d - Browse repository at this point
Copy the full SHA e81f52dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 7b018de - Browse repository at this point
Copy the full SHA 7b018deView commit details -
Don't leave out package prefixes under homogenizedView. We want to see them to make sure they are inserted in the same way before and after pickling. This discovered a problem in unpickler where package object prefixes were not correctly inserted back. Test case is pickleAlias.scala.
Configuration menu - View commit details
-
Copy full SHA for 4ce52d0 - Browse repository at this point
Copy the full SHA 4ce52d0View commit details -
Configuration menu - View commit details
-
Copy full SHA for d874964 - Browse repository at this point
Copy the full SHA d874964View commit details
Commits on Feb 2, 2019
-
Change scheme how sourcenames are computed from filenames to account for filenames that have additional `.`s in them. Fix comments.
Configuration menu - View commit details
-
Copy full SHA for ed5304e - Browse repository at this point
Copy the full SHA ed5304eView commit details -
Configuration menu - View commit details
-
Copy full SHA for db36559 - Browse repository at this point
Copy the full SHA db36559View commit details -
Configuration menu - View commit details
-
Copy full SHA for 537f80d - Browse repository at this point
Copy the full SHA 537f80dView commit details