Skip to content

Simplify Tasty Trees #4277

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 5 commits into from
Apr 10, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion compiler/src/dotty/tools/dotc/typer/ProtoTypes.scala
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ object ProtoTypes {
val mbr = if (privateOK) tp1.member(name) else tp1.nonPrivateMember(name)
def qualifies(m: SingleDenotation) =
memberProto.isRef(defn.UnitClass) ||
compat.normalizedCompatible(NamedType(tp1, name, m), memberProto)
tp1.isValueType && compat.normalizedCompatible(NamedType(tp1, name, m), memberProto)
// Note: can't use `m.info` here because if `m` is a method, `m.info`
// loses knowledge about `m`'s default arguments.
mbr match { // hasAltWith inlined for performance
Expand Down
5 changes: 5 additions & 0 deletions tests/neg/hkprefix.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
class Lambda[T] { class Tp }

object Test {
def f(x: Lambda # Tp) = ??? // error
}
Loading