Commit 5c4581d
[generator] Don't invalidate interface if static method is invalidated (#660)
Fixes: #588
If we cannot bind a method on an interface we mark the interface as
unbindable and omit the interface from the generated code, and
invalidate anything that depends on the interface. This is because
an interface with a missing method cannot be implemented in C#.
However, if the method is `static` then we *can* remove the method
while keeping the interface, as the user is not required to implement
the static method.
Update `GenBase.OnValidate()` so that invalid static methods don't
invalidate their declaring interface.
Note we already properly handled Default Interface Methods, this
adds support for `static` methods as well.1 parent 9687bb5 commit 5c4581d
File tree
2 files changed
+38
-3
lines changed- tests/generator-Tests/Unit-Tests
- tools/generator/Java.Interop.Tools.Generator.ObjectModel
2 files changed
+38
-3
lines changedLines changed: 35 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
396 | 396 | | |
397 | 397 | | |
398 | 398 | | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
399 | 434 | | |
400 | 435 | | |
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
677 | 677 | | |
678 | 678 | | |
679 | 679 | | |
680 | | - | |
681 | | - | |
| 680 | + | |
| 681 | + | |
682 | 682 | | |
683 | 683 | | |
684 | | - | |
| 684 | + | |
685 | 685 | | |
686 | 686 | | |
687 | 687 | | |
| |||
0 commit comments