Skip to content
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

Invoking a protected constructor results in a strange error message #4707

Closed
scabug opened this issue Jun 17, 2011 · 3 comments
Closed

Invoking a protected constructor results in a strange error message #4707

scabug opened this issue Jun 17, 2011 · 3 comments
Assignees

Comments

@scabug
Copy link

scabug commented Jun 17, 2011

I was trying to invoke a constructor of a class MLNFactorGraph that is protected[MLNFactorGraph]. The compiler gave the following error:

error: type mismatch;
found   : scala.runtime.StringAdd
required: edu.uulm.scbayes.mln.MLNFactorGraph
val sliceGraph: MLNFactorGraph = new MLNFactorGraph(

for the following code snippet:

    val sliceGraph: MLNFactorGraph = new MLNFactorGraph(
      newGraph.gpMap,
      newGraph.fgpMap,
      newFactors,
      (newNodes ++ newFactors.flatMap(_.variables)).toSet.toSeq, //take all new variables and all variables that are adjacent to a used factor
      newSignature
    )

The file compiles when I comment out this section. The file compiles also, when I make the constructor of MLNFactorGraph public.

The involved files reside in different packages.

I was not able to reproduce this bug in a synthetic example.

@scabug
Copy link
Author

scabug commented Jun 17, 2011

Imported From: https://issues.scala-lang.org/browse/SI-4707?orig=1
Reporter: ziggystar
Affected Versions: 2.9.0

@scabug
Copy link
Author

scabug commented Jun 21, 2011

@paulp said:
Sorry, this is the original, meant to close the other.

@scabug
Copy link
Author

scabug commented Oct 30, 2011

@paulp said:
#4645, #4685, #4707, #4987, #5058 are all the same bug. Consolidating under #4987.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants