Skip to content

Compiler Absturz in Wellformedness #2

Description

@UCMeyer

In folgendem Testprogramm ist ein Fehler, weil die Variable ghost nicht existiert.

class Box
method f(int x)
skip

class Program
Box b
method main()
new Box b
call b::f(ghost)
............

Das führt im Compiler zu einem Absturz:

Exception in thread "main" java.util.NoSuchElementException: None.get
at scala.None$.get(Option.scala:627)
at scala.None$.get(Option.scala:626)
at de.thm.mni.hybridcomputing.roopl.wellformedness.Wellformedness$.check$$anonfun$9(Wellformedness.scala:208)
at scala.collection.immutable.List.map(List.scala:246)
at scala.collection.immutable.List.map(List.scala:79)
at de.thm.mni.hybridcomputing.roopl.wellformedness.Wellformedness$.check(Wellformedness.scala:208)
...

In Wellformedness.scala steht an der Stelle:
// ??? Todo fix flatMap and get
Translatable.Call(statement.callee.flatMap(mapVarRef), method, statement.args.map(_.get.asInstanceOf[TypedVariable]))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions