-
Notifications
You must be signed in to change notification settings - Fork 494
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do not complain about interface and abstract class when instantiating…
… from object
- Loading branch information
1 parent
bef5a26
commit 5ad91d2
Showing
3 changed files
with
67 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?php | ||
|
||
namespace Bug4471; | ||
|
||
abstract class Foo | ||
{ | ||
|
||
} | ||
|
||
interface Bar | ||
{ | ||
|
||
} | ||
|
||
function (Foo $foo, Bar $bar, Baz $baz): void { | ||
new $foo; | ||
new $bar; | ||
new $foo(1); | ||
new $baz; | ||
}; | ||
|
||
function (): void { | ||
$foo = Foo::class; | ||
new $foo; | ||
|
||
$bar = Bar::class; | ||
new $bar; | ||
}; |