mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-04 19:21:13 +01:00
Allow abstract types to be used in Convert (#7388)
Notably this allows accessing fields in an abstract base class via a derived class without going through `base`. E.g. `my_obj.field_in_base_class` rather than `my_obj.base.field_in_base_class`.
This commit is contained in:
@@ -133,16 +133,6 @@ import Cpp;
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR:
|
||||
abstract class Abstract {
|
||||
// CHECK:STDERR: fail_todo_abstract_nonvirtual_dtor_but_virtual_fns.carbon:[[@LINE+10]]:3: error: initialization of abstract type `Abstract` [AbstractTypeInInit]
|
||||
// CHECK:STDERR: abstract fn F(self);
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: fail_todo_abstract_nonvirtual_dtor_but_virtual_fns.carbon:[[@LINE-4]]:1: note: class was declared abstract here [ClassAbstractHere]
|
||||
// CHECK:STDERR: abstract class Abstract {
|
||||
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// CHECK:STDERR: fail_todo_abstract_nonvirtual_dtor_but_virtual_fns.carbon:[[@LINE+4]]:17: note: initializing function parameter [InCallToFunctionParam]
|
||||
// CHECK:STDERR: abstract fn F(self);
|
||||
// CHECK:STDERR: ^~~~
|
||||
// CHECK:STDERR:
|
||||
abstract fn F(self);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user