Better error message on too many inherited fields.
This commit is contained in:
@@ -136,7 +136,7 @@ class Foo {
|
||||
}
|
||||
}
|
||||
|
||||
class Bar is Foo { // expect runtime error: A class may not have more than 255 fields, including inherited ones.
|
||||
class Bar is Foo {
|
||||
new {
|
||||
super
|
||||
_field129 = 129
|
||||
@@ -266,15 +266,16 @@ class Bar is Foo { // expect runtime error: A class may not have more than 255 f
|
||||
_field253 = 253
|
||||
_field254 = 254
|
||||
_field255 = 255
|
||||
_field256 = 256
|
||||
}
|
||||
|
||||
bar {
|
||||
IO.print(_field129)
|
||||
IO.print(_field256)
|
||||
IO.print(_field255)
|
||||
}
|
||||
}
|
||||
|
||||
var bar = new Bar
|
||||
bar.foo
|
||||
bar.bar
|
||||
bar.foo // expect: 1
|
||||
// expect: 128
|
||||
bar.bar // expect: 129
|
||||
// expect: 255
|
||||
|
||||
Reference in New Issue
Block a user