mirror of
https://github.com/apple/pkl.git
synced 2026-09-13 13:21:47 +02:00
Remove abstract properties (#1781)
This commit is contained in:
Vendored
-5
@@ -1,5 +0,0 @@
|
||||
class Foo {
|
||||
abstract bar: Int
|
||||
}
|
||||
|
||||
res = new Foo { bar = 5 }
|
||||
Vendored
-1
@@ -1 +0,0 @@
|
||||
abstract foo: Int
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
abstract function foo(): Int
|
||||
+1
-1
@@ -18,7 +18,7 @@ res3 = f(List(1, 2))
|
||||
res4 = f(Set(1, 2))
|
||||
|
||||
abstract class Animal {
|
||||
abstract size: String
|
||||
size: String
|
||||
abstract function walk(): String
|
||||
}
|
||||
|
||||
|
||||
Vendored
-8
@@ -1,8 +0,0 @@
|
||||
–– Pkl Error ––
|
||||
Cannot define an abstract member in a non-abstract class.
|
||||
|
||||
x | abstract bar: Int
|
||||
^^^^^^^^
|
||||
at abstractMemberInNonAbstractClass#Foo (file:///$snippetsDir/input/errors/abstractMemberInNonAbstractClass.pkl)
|
||||
|
||||
A member can only be `abstract` if its enclosing class is also `abstract`.
|
||||
Vendored
-8
@@ -1,8 +0,0 @@
|
||||
–– Pkl Error ––
|
||||
Cannot define an abstract member in a non-abstract class.
|
||||
|
||||
x | abstract foo: Int
|
||||
^^^^^^^^
|
||||
at abstractMemberInNonAbstractModule (file:///$snippetsDir/input/errors/abstractMemberInNonAbstractModule.pkl)
|
||||
|
||||
A member can only be `abstract` if its enclosing class is also `abstract`.
|
||||
Vendored
+1
-1
@@ -1,5 +1,5 @@
|
||||
–– Pkl Error ––
|
||||
Cannot define an abstract member in a non-abstract class.
|
||||
Cannot define an abstract method in a non-abstract class.
|
||||
|
||||
x | abstract function bar(): Int
|
||||
^^^^^^^^
|
||||
|
||||
Vendored
+8
@@ -0,0 +1,8 @@
|
||||
–– Pkl Error ––
|
||||
Cannot define an abstract method in a non-abstract module.
|
||||
|
||||
x | abstract function foo(): Int
|
||||
^^^^^^^^
|
||||
at abstractMethodInNonAbstractModule (file:///$snippetsDir/input/errors/abstractMethodInNonAbstractModule.pkl)
|
||||
|
||||
A member can only be `abstract` if its enclosing class is also `abstract`.
|
||||
Reference in New Issue
Block a user