added more test-cases for class redefintion
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
2024-07-22 18:28:21 +09:00
parent 28c05ff903
commit 0e2dfea7fb
2 changed files with 40 additions and 0 deletions

View File

@ -147,3 +147,41 @@ class X [ a b c ] {
}
}
}
---
class F {
}
class F { ##ERROR: exception not handled - "prohibited redefintion of F
}
---
class F {
}
F := 30 ##ERROR: exception not handled - "prohibited redefintion of F
---
class F {
}
F := (class { ##ERROR: exception not handled - "prohibited redefintion of F"
})
---
F := (class {
})
F := (class F { ##ERROR: exception not handle - "prohibited redefintion of F"
})
## TDOO: do we need to allow the above?
##F := 30
##class F { ##ERROR: exception not handled - "prohibited redefintion of F"
##}