3 <<file
:__EnableUnstableFeatures('modules')>>
9 // Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
10 <<file
:__EnableUnstableFeatures('modules'), __Module('A')>>
13 public function pub(): void
{}
16 public function internal(): void
{}
20 // This is allowed because it's the same module
21 <<__Override
, __Internal
>>
22 public function internal(): void
{}
25 // This is illegal, overriding a public method to be internal
28 <<__Override
, __Internal
>>
29 public function pub(): void
{}
34 // Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
35 <<file
:__EnableUnstableFeatures('modules'), __Module('B')>>
38 <<__Override
, __Internal
>>
39 public function pub(): void
{}
43 // This is illegal because it is overriding an internal method from a different
46 <<__Override
, __Internal
>>
47 public function internal(): void
{}