In Main.daml I have
template Asset
with
issuer : Party
owner : Party
name : Text
dateOfAppraisal : Date
value : Decimal
where
ensure name /= ""
signatory issuer
but when I try to import that template into a Treasury.daml with
module Treasury where
import Main (Asset)
template TreasurerRole
with
treasurer : Party
where
signatory treasurer
controller treasurer can
CreateAsset : ContractId Asset
with
owner : Party
name : Text
dateOfAppraisal : Date
value : Decimal
do
create Asset with issuer = treasurer, ..
DAML complains on the “Asset” in the final line with:
Message:
daml/Treasury.daml:21:18: error:
Not in scope: data constructor ‘Asset’
Perhaps you want to add ‘Asset’ to the import list in the import of
‘Main’ (daml/Treasury.daml:5:1-19).
But I already imported Asset from Main ?