Only enforce property/method body requirements in the case that the
SourceFileType is SOURCE. This allows fast-vapi to slip through without
complaints.
Report.error (source_reference, "Extern methods cannot be abstract or virtual");
} else if (external && body != null) {
Report.error (source_reference, "Extern methods cannot have bodies");
- } else if (!is_abstract && !external && !external_package && body == null) {
+ } else if (!is_abstract && !external && source_type == SourceFileType.SOURCE && body == null) {
Report.error (source_reference, "Non-abstract, non-extern methods must have bodies");
}
}
expect (TokenType.CLOSE_BRACE);
- if (!prop.is_abstract && !prop.external) {
+ if (!prop.is_abstract && prop.source_type == SourceFileType.SOURCE) {
bool empty_get = (prop.get_accessor != null && prop.get_accessor.body == null);
bool empty_set = (prop.set_accessor != null && prop.set_accessor.body == null);
analyzer.current_symbol = this;
- if (!prop.external_package) {
+ if (prop.source_type == SourceFileType.SOURCE) {
if (body == null && !prop.interface_only && !prop.is_abstract) {
/* no accessor body specified, insert default body */