-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Fix #2334: Require at least one digit after '.' in floating point literals #2336
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
felixmulder
approved these changes
May 1, 2017
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great to me! :)
1. Fix problem in fullNameSeparated 2. Revise expandedName operations
Don't encode operator symbols internally. Instead, let the backend convert them when generating code. # Conflicts: # compiler/src/dotty/tools/dotc/core/Names.scala # compiler/src/dotty/tools/dotc/core/StdNames.scala # compiler/src/dotty/tools/dotc/transform/PostTyper.scala # Conflicts: # compiler/src/dotty/tools/backend/jvm/DottyBackendInterface.scala # compiler/src/dotty/tools/dotc/core/Names.scala
I found the problem when trying to debug what went wrong with encoded names in backend. I added an assert that the toString of a name would not contain symbolic operator characters. The assert triggered because an error type forced the message (without printing to Console later).
was a patch left over from a previosu attempt to bugfix. Actually goes wrong when reading string literals that are represented as UTF8 names.
Also: use "_$" instead of "~" as filler when taking the full name of a term member. If the term member is symbolic (e.g. +) the filler name would be misinterpreted as a symbolic name "~+", so would be mangled as "$tilde$plus$ instead of "~$plus".
them with a symbolic name.
The return type is now ThisName instead of Name.
Avoids mutable names and the hassles associated with them.
Looks like it's not required.
# Conflicts: # compiler/src/dotty/tools/dotc/core/Names.scala
Compare unmangled name when searching for roots in Scala2 and Tasty unpickling. Since we now load files with their unmangled name, we don't need to go through mangled names anymore.
This was accidentally reverted from b641181.
There's no need to add mangled qualified names in the name table. Instead we compute the mangled string directly and more efficiently. Also, bug fixes to make semantic names work: - When creating a fully qualified name, we need to convert the last part to a simple name. If the last part is not already a simple name or typename version of it, it should be mangled - Mangling needs to sanitize because a legal name such as <init> might illegal when it gets a suffix or prefix.
The previous logic would have applied several suffixes in reverse.
Previously, we also interpreted the newline as a significant input, which led to -Xprompt stopping only at every second error.
We previously got: an identifier expected but `=` found even though the token that was found was a `}`! The fallacy was that in.name is not always set to something significant. I had to refactor quite a bit to avoid this. Anyway, I thought the code was a bit underwhelming with `null` interpreted and an "explanation" that simply repeated what was said in the main message.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
…erals
This seemingly simple fix opened up a few other problems with error reporting. It's based on the symbolic names PR because we need that for avoiding
<error>
in error messages. The commits from e8860ee are new to this PR.