Skip to content

Downgrading raises type level #159

Description

@ssoelvsten

Notice the following lines of code in rt/downgrading.mts

const r = typeOnly
? new LCopyVal(data, lub(data.lev, taintedLevTo), taintedLevTo)
: new LCopyVal(data, taintedLevTo);

If it is a value downgrade (downgrade), this will raise the type level. That is, the following program returns 42@{alice}%{alice} rather than 42@{alice}%{} as expected.

import IfcUtil

let val x = 42 raisedTo `{alice, bob}`
in pdowngrade (x, authority, `{alice}`)
end

For simplicity, this example requires --no-nmifc

Metadata

Metadata

Assignees

No one assigned

    Labels

    📁 ./rtChanges and additions to the runtime

    Type

    Fields

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions