SI-8449 Fix spurious error with Java raw type over a Scala class#4117
Merged
adriaanm merged 1 commit intoscala:2.11.xfrom Nov 17, 2014
Merged
SI-8449 Fix spurious error with Java raw type over a Scala class#4117adriaanm merged 1 commit intoscala:2.11.xfrom
adriaanm merged 1 commit intoscala:2.11.xfrom
Conversation
When the Scala typechecker typechecks signatures in Java sources, it must enable use of a type constructor without applied type arguments (a raw type). However, the check in `adaptType::properTypeRequired` was too restricive: it only allows raw types given a) we are typechecking a Java source file and b) the type constructor itself is Java defined. The second check does not make sense; it is perfectly legal to define a Java raw type for over a Scala defined type constructor. This commit removes it. The bug was noticed in the Scaladoc context, as it explores the signatures of all Java sources so it can document them. But the enclosed test demonstrates the underlying bug under normal compilation.
Contributor
|
LGTM |
adriaanm
added a commit
that referenced
this pull request
Nov 17, 2014
SI-8449 Fix spurious error with Java raw type over a Scala class
Contributor
|
I noticed the test files are not in pos. |
lrytz
added a commit
to lrytz/scala
that referenced
this pull request
May 17, 2016
Follow-up for scala#4117
Member
|
thanks! #5171 |
lrytz
added a commit
to lrytz/scala
that referenced
this pull request
May 17, 2016
Follow-up for scala#4117
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
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.
When the Scala typechecker typechecks signatures in Java sources,
it must enable use of a type constructor without applied type
arguments (a raw type).
However, the check in
adaptType::properTypeRequiredwas toorestricive: it only allows raw types given a) we are typechecking a
Java source file and b) the type constructor itself is Java defined.
The second check does not make sense; it is perfectly legal to define
a Java raw type for over a Scala defined type constructor. This commit
removes it.
The bug was noticed in the Scaladoc context, as it explores the
signatures of all Java sources so it can document them. But the
enclosed test demonstrates the underlying bug under normal
compilation.
Review by @adriaanm