enhanced the compiler logic to handle the class-level variales
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@ -281,3 +281,20 @@ class(#byte #limited #final #limited) Kuduro { ##ERROR: syntax error - conflicti
|
||||
---
|
||||
class(#byte #bytes) Kuduro { ##ERROR: syntax error - unrecognized class attribute name '#bytes'
|
||||
}
|
||||
|
||||
---
|
||||
class Kuduro [a b c] {
|
||||
var d e
|
||||
var a ##ERROR: syntax error - duplicate instance variable name 'a'
|
||||
}
|
||||
|
||||
---
|
||||
class Kuduru [a [b] c] {
|
||||
var d e
|
||||
var b ##TODO: should this be prohibited?
|
||||
}
|
||||
|
||||
class Kuduro [a [b] c] {
|
||||
var d e
|
||||
var(#class) b ##ERROR: syntax error - duplicate class variable name 'b'
|
||||
}
|
||||
|
@ -31,7 +31,7 @@ fun String length() { ##ERROR: syntax error - 'String' not followed by ( but fol
|
||||
|
||||
---
|
||||
|
||||
class A [ 10 ] { ##ERROR: syntax error - not variable name - 10
|
||||
class A [ 10 ] { ##ERROR: syntax error - not variable name '10'
|
||||
}
|
||||
|
||||
---
|
||||
@ -44,11 +44,11 @@ class A [ [ [a] ] ] { ##ERROR: syntax error - not variable name
|
||||
}
|
||||
|
||||
---
|
||||
class A [ a + ] { ##ERROR: syntax error - not variable name - +
|
||||
class A [ a + ] { ##ERROR: syntax error - not variable name '+'
|
||||
}
|
||||
|
||||
---
|
||||
class A [ + ] { ##ERROR: syntax error - not variable name - +
|
||||
class A [ + ] { ##ERROR: syntax error - not variable name '+'
|
||||
}
|
||||
|
||||
---
|
||||
|
Reference in New Issue
Block a user