Skip to content

SI-8502 create PackageClass instead of Class symbol stubs for pkgs #4650

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 1 commit into from
Jul 20, 2015

Conversation

lrytz
Copy link
Member

@lrytz lrytz commented Jul 20, 2015

#4111 creates a stub type symbol
for missing packages, deferring (or avoiding) a crash if a package
is missing.

The symbol created was a ClassSymbol, which could lead to an assertion
failure in flattten:

case TypeRef(pre, sym, args) if isFlattenablePrefix(pre) =>
  assert(args.isEmpty && sym.enclosingTopLevelClass != NoSymbol, sym.ownerChain)

pre is the stub ClassSymbol, so isFlattenablePrefix is true (but
it should be false). The assertion then fails because the enclosing
class of a top-level class defined in a missing package is NoSymbol.

This failed only with GenBCode, which traverses more of the symbol
graph while building ClassBTypes: it looks collects the nested classes
of Outer into a NestedInfo.

@scala-jenkins scala-jenkins added this to the 2.11.8 milestone Jul 20, 2015
scala#4111 creates a stub type symbol
for missing packages, deferring (or avoiding) a crash if a package
is missing.

The symbol created was a ClassSymbol, which could lead to an assertion
failure in flattten:

    case TypeRef(pre, sym, args) if isFlattenablePrefix(pre) =>
      assert(args.isEmpty && sym.enclosingTopLevelClass != NoSymbol, sym.ownerChain)

`pre` is the stub ClassSymbol, so `isFlattenablePrefix` is true (but
it should be false). The assertion then fails because the enclosing
class of a top-level class defined in a missing package is NoSymbol.

This failed only with GenBCode, which traverses more of the symbol
graph while building ClassBTypes: it looks collects the nested classes
of `Outer` into a `NestedInfo`.
@lrytz
Copy link
Member Author

lrytz commented Jul 20, 2015

Review by @retronym. In 2.12.x (under GenBCode), the assertion in Flatten failed while building Scaladoc in IntelliJ because asm was not on the classpath.

@retronym
Copy link
Member

LGTM!

retronym added a commit that referenced this pull request Jul 20, 2015
SI-8502 create PackageClass instead of Class symbol stubs for pkgs
@retronym retronym merged commit 0e9525a into scala:2.11.x Jul 20, 2015
@lrytz lrytz deleted the t8502-package branch July 30, 2015 09:14
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.

3 participants