Skip to content

Fix #5188: See through annotations and typevars when computing argume… #5215

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
merged 3 commits into from
Oct 10, 2018

Conversation

odersky
Copy link
Contributor

@odersky odersky commented Oct 7, 2018

See through annotations (and typevars) when computing argument types.

Copy link
Member

@dottybot dottybot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello, and thank you for opening this PR! 🎉

All contributors have signed the CLA, thank you! ❤️

Commit Messages

We want to keep history, but for that to actually be useful we have
some rules on how to format our commit messages (relevant xkcd).

Please stick to these guidelines for commit messages:

  1. Separate subject from body with a blank line
  2. When fixing an issue, start your commit message with Fix #<ISSUE-NBR>:
  3. Limit the subject line to 72 characters
  4. Capitalize the subject line
  5. Do not end the subject line with a period
  6. Use the imperative mood in the subject line ("Add" instead of "Added")
  7. Wrap the body at 80 characters
  8. Use the body to explain what and why vs. how

adapted from https://chris.beams.io/posts/git-commit

Have an awesome day! ☀️

@odersky odersky requested a review from nicolasstucki October 7, 2018 19:24
@nicolasstucki
Copy link
Contributor

The commit message has a typo, #5198 is not an issue.

@nicolasstucki
Copy link
Contributor

I guess it was supposed to be #5188. Is that correct?

Copy link
Contributor

@nicolasstucki nicolasstucki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change the commit message and add tests

See through annotations (and typevars) when computing argument types.
@odersky
Copy link
Contributor Author

odersky commented Oct 8, 2018

Yes, #5188. I changed the commit message.

@nicolasstucki nicolasstucki dismissed their stale review October 8, 2018 07:36

Changes where done

@allanrenucci allanrenucci changed the title Fix #5198: See through annotations and typevars when computing argume… Fix #5188: See through annotations and typevars when computing argume… Oct 8, 2018
@odersky
Copy link
Contributor Author

odersky commented Oct 8, 2018

Now I get in -Ycheck:all:

Exception in thread "main" class dotty.tools.dotc.reporting.diagnostic.messages$Error at i5188.scala:3: right-hand side of inline value args must be a known value

The problem is that the varargs 1, 2, 3 are known values, but their translation SeqLiteral(1, 2, 3) is not. @nicolasstucki can you see what we should do about it? We could just disable the checkInlineConformant check in Retypers, but I am not sure that's the right thing to do here.

@odersky odersky removed their assignment Oct 8, 2018
@nicolasstucki
Copy link
Contributor

I will have a look.

@nicolasstucki
Copy link
Contributor

The fix in TypeApplications.scala looks good to me. @liufengyun Could you review my additional commits. Thanks.

Copy link
Contributor

@liufengyun liufengyun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@nicolasstucki nicolasstucki merged commit b5d9ef3 into scala:master Oct 10, 2018
@nicolasstucki nicolasstucki deleted the fix-#5198 branch October 10, 2018 10:41
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.

4 participants