Page Menu
Home
Xreate
Search
Configure Global Search
Log In
Docs
Questions
Repository
Issues
Patches
Internal API
Files
F3995841
unsafe-code.xreate
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Wed, Jul 8, 4:44 AM
Size
529 B
Mime Type
text/plain
Expires
Fri, Jul 10, 4:44 AM (1 d, 19 h)
Engine
blob
Format
Raw Data
Handle
271556
Attached To
rXR Xreate
unsafe-code.xreate
View Options
//unsafe code propagation rule
rule: (X: function, Y: function)
case X call Y
{
warning Y tag unsafe -> X tag unsafe
message "safe function should not call unsafe code"
}
testfunc3 = function: (a: num, b: num)->num , unsafe //function tags list
{
x = a+b: num;
y = a - b: num;
(x + y) / 2;
}
testfunc2 = function: (a: num)->bool // since testfunc3 marked as unsafe code,
// testfunc2 should be marked so too
{
b = testfunc3(a+1, a-1): num;
(b==0);
}
Event Timeline
Log In to Comment