-
Notifications
You must be signed in to change notification settings - Fork 1
builtin contract name collision? #3
Description
This is accepted
contract Contract {
Contract{any} addr;
constructor() { super(); }
@public void foo{sender->this} () {
addr.foo();
}
}
Replacing Contract with A is rejected. I think this is because we use Contract as a base type.
Task :run FAILED
/Users/noah/Cornell/SCIF/compiler/./.scif/ntc0.cons | <----
The program type-checks.
/Users/noah/Cornell/SCIF/compiler/./.scif/foo0.ifc | <----
Static type error.
Code locations most likely to be wrong:
-
main.scif, line 6, column 14:
Target contract must be trusted to call this method.
addr.foo();
^ -
main.scif, line 2, column 12:
Variable addr may be labeled incorrectly.
A{any} addr;
^
11 actionable tasks: 7 executed, 4 up-to-date
Checking contract LockManager
Checking contract TrustManager
Checking contract Contract
Checking contract ManagedContract
Checking contract ContractImp
Checking contract ExternallyManagedContract
Checking contract ManagedContractImp
Checking contract ExternallyManagedContractImp
Checking contract A