-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix implement inherited abstract methods (#162)
- Loading branch information
Showing
3 changed files
with
50 additions
and
50 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
object shouldHaveBody { | ||
@Expect(code="shouldHaveBody", level="error") | ||
method noBody() | ||
} | ||
|
||
const o = object { | ||
@Expect(code="shouldHaveBody", level="error") | ||
method noBody() | ||
} |
This file was deleted.
Oops, something went wrong.
41 changes: 41 additions & 0 deletions
41
test/validations/shouldImplementInheritedAbstractMethods.wlk
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,41 @@ | ||
// abstract class | ||
class A { | ||
method abstractBlah() | ||
} | ||
|
||
@Expect(code="shouldImplementInheritedAbstractMethods", level="error") | ||
object anA inherits A { | ||
} | ||
|
||
class B inherits A { | ||
method otherAbstract(one, two) | ||
} | ||
|
||
@Expect(code="shouldImplementInheritedAbstractMethods", level="error") | ||
object aB inherits B {} | ||
|
||
|
||
class Animal { | ||
var property nombre | ||
} | ||
|
||
object ornitorrinco inherits Animal(nombre = "julian") {} | ||
|
||
const o = @Expect(code="shouldImplementInheritedAbstractMethods", level="error") object inherits A {} | ||
|
||
const o3 = @Expect(code="shouldImplementInheritedAbstractMethods", level="error") object inherits B {} | ||
|
||
const o4 = object inherits Animal(nombre = "firulais") {} | ||
|
||
class C { | ||
method abstractBlah(someParam) | ||
} | ||
|
||
@Expect(code="shouldImplementInheritedAbstractMethods", level="error") | ||
object aC inherits C { | ||
method abstractBlah() {} | ||
} | ||
|
||
const unnamedAC = @Expect(code="shouldImplementInheritedAbstractMethods", level="error") object inherits C { | ||
method abstractBlah() {} | ||
} |