我的验证环境中有下一个代码:
// seq_file.e
extend SPECIFIC_TYPE sequence {
keep type driver is a SPECIFIC_TYPE sequence_driver;
event some_event is @driver.as_a(SPECIFIC_TYPE sequence_driver).some_event;
};
extend SPECIFIC_TYPE SEQ_NAME sequence {
body()@driver.clock is only {
var foo := driver.specific_type_field;
};
};
请注意,keep type driver is a..
由于没有必要在driver
' 行开始var foo..
但是,keep type driver is a..
不影响some_event
,即如果as_a
从行中删除强制转换,则会出现编译错误'driver' does not have 'some_event' though its subtype do. use driver.as_a(SPECIFIC_TYPE sequence_driver)
。
为什么keep type driver is a..
无法投driver
下线some_event..
?
谢谢您的帮助