File tree 1 file changed +9
-13
lines changed
1 file changed +9
-13
lines changed Original file line number Diff line number Diff line change @@ -490,22 +490,18 @@ void cpp_typecheckt::typecheck_compound_declarator(
490
490
component.type ().set (" #virtual_name" , virtual_name);
491
491
492
492
// Check if it is a pure virtual method
493
- if (is_virtual )
493
+ if (value. is_not_nil () && value. id () == ID_constant )
494
494
{
495
- if (value.is_not_nil () && value.id ()==ID_constant)
495
+ mp_integer i;
496
+ to_integer (value, i);
497
+ if (i!=0 )
496
498
{
497
- mp_integer i;
498
- to_integer (value, i);
499
- if (i!=0 )
500
- {
501
- error ().source_location =declarator.name ().source_location ();
502
- error () << " expected 0 to mark pure virtual method, got "
503
- << i << eom;
504
- throw 0 ;
505
- }
506
- component.set (" is_pure_virtual" , true );
507
- value.make_nil ();
499
+ error ().source_location = declarator.name ().source_location ();
500
+ error () << " expected 0 to mark pure virtual method, got " << i << eom;
501
+ throw 0 ;
508
502
}
503
+ component.set (" is_pure_virtual" , true );
504
+ value.make_nil ();
509
505
}
510
506
511
507
typecheck_member_function (
You can’t perform that action at this time.
0 commit comments