Skip to content

Ycheck that methods defined in ClassInfo exist in tree. #735

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 25 commits into from
Aug 4, 2015

Conversation

DarkDimius
Copy link
Contributor

based on #693.
Known to fail: trait TreeInfo tree does not define methods: Set(method initial$MatchingArgs)

@odersky
Copy link
Contributor

odersky commented Jul 27, 2015

We now see a non-abstract method error for a lazy val in PatMat.

used a wrong member function inside,
led to errors similar to:

 java.lang.ClassFormatError: Duplicate method name&signature in class file dotty/tools/dotc/core/Types$WildcardType
They should not become deferred.
And there could be multiple symbols with same name in same scope, e.g.:

implicit class Foo(){}

will create implicit method Foo that and a lazy module named Foo
Making a correct fix could take some time,
and I want to find other issues before I start working on this one.
@DarkDimius
Copy link
Contributor Author

With fixes from this branch, dotty compiled by dotty can print greeting without dying.
Trying to compile something fails with

java.lang.AbstractMethodError: Method dotty/tools/dotc/core/Names$TypeName.scala$collection$IndexedSeqOptimized$$super$endsWith(Lscala/collection/GenSeq;)Z is abstract
    at dotty.tools.dotc.core.Names$TypeName.scala$collection$IndexedSeqOptimized$$super$endsWith(Names.scala)
    at scala.collection.IndexedSeqOptimized$class.endsWith(IndexedSeqOptimized.scala:278)
    at dotty.tools.dotc.core.Names$Name.endsWith(Names.scala:38)
    at dotty.tools.dotc.core.NameOps$NameDecorator$.isAvoidClashName$extension(NameOps.scala:75)
    at dotty.tools.dotc.core.NameOps$NameDecorator$.stripAvoidClashSuffix$extension(NameOps.scala:145)
    at dotty.tools.dotc.core.NameOps$NameDecorator$.adjustIfModuleClass$extension(NameOps.scala:149)
    at dotty.tools.dotc.core.Symbols.newModuleSymbol(Symbols.scala:154)
    at dotty.tools.dotc.core.Symbols.newPackageSymbol(Symbols.scala:206)
    at dotty.tools.dotc.core.Definitions.RootClass(Definitions.scala:98)
    at dotty.tools.dotc.core.Denotations$DenotationsBase.recur$2(Denotations.scala:968)
    at dotty.tools.dotc.core.Denotations$DenotationsBase.staticRef(Denotations.scala:984)
    at dotty.tools.dotc.core.Symbols.requiredPackage(Symbols.scala:347)
    at dotty.tools.dotc.core.Definitions.ScalaPackageVal(Definitions.scala:110)
    at dotty.tools.dotc.core.Definitions.ScalaPackageClass(Definitions.scala:112)
    at dotty.tools.dotc.core.Definitions.AnyClass(Definitions.scala:141)
    at dotty.tools.dotc.core.Definitions.syntheticCoreClasses(Definitions.scala:625)
    at dotty.tools.dotc.core.Definitions.init(Definitions.scala:647)
    at dotty.tools.dotc.Compiler.rootContext(Compiler.scala:98)
    at dotty.tools.dotc.Compiler.newRun(Compiler.scala:125)
    at dotty.tools.dotc.Driver.doCompile(Driver.scala:20)
    at dotty.tools.dotc.Driver.process(Driver.scala:44)
    at dotty.tools.dotc.Driver.main(Driver.scala:48)
    at dotty.tools.dotc.Main.main(Main.scala)

@odersky
Copy link
Contributor

odersky commented Jul 28, 2015

What's the partest failure? Should we try to merge this or work on the branch separately

Mixi was not calling transformFollowing on generated setters.
@DarkDimius
Copy link
Contributor Author

The failure is due to incorrect check file added in this pr(extra line break). It should be fixed now.

@DarkDimius
Copy link
Contributor Author

@odersky tests passed, please review

Added suggested changes by myself and @smarter.
@odersky
Copy link
Contributor

odersky commented Aug 4, 2015

LGTM for everything.

odersky added a commit that referenced this pull request Aug 4, 2015
Ycheck that methods defined in ClassInfo exist in tree.
@odersky odersky merged commit 07e24e8 into scala:master Aug 4, 2015
@allanrenucci allanrenucci deleted the ycheck-methods branch December 14, 2017 19:26
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