Aladdin - Scala Bugtracking
[#1055] project: compiler priority: medium category: bug
submitter assigned to status date submitted
Nikolay Martin fixed 2007-04-18 13:22:13.0
subject [contrib #427] sealed class file is broken
code
// Only occurs when there are separate source files, compiled on separate command lines

// First.scala
package p
{
    abstract sealed class Forbidden {}

    class Automata(unused: Forbidden)
    {
        def this(data: Int) = this(new Forbidden {})
    }
}

// Second.scala
class Derived extends p.Automata(0) {}

/*
$ rm -f *.class p/?*.class
$ scalac First.scala
$ scalac Second.scala
error: error while loading Forbidden, class file '.\p\Forbidden.class' is broken
(error reading Scala signature of .\p\Forbidden.class: malformed Scala signature of Forbidden at 494; reference type $anon of constructor Automata refers to nonexisting symbol.)
one error found
*/
what happened
error message: class file is broken
what expected successful compilation, as occurs when the source files are compiled on the one command line, or Forbidden is not sealed.
[back to overview]
Changes of this bug report
Nikolay  edited on  2007-04-18 13:22:53.0
contribution #427
Martin  edited on  2007-04-29 18:14:20.0