mirror of
https://github.com/polserver/polserver
synced 2026-08-13 08:23:08 -04:00
* Format testsuite escript * Format testsuite pol * Update docs Switch "attributes" to "members" to better align with Escript terms. * Add core-changes, breaking-changes
15 lines
469 B
Text
15 lines
469 B
Text
// A class-variable cannot shadow a constant, because the Optimizer will not
|
|
// be able to determine if an un-scoped identifier used in an expression
|
|
// references the constant or the class variable. The Optimizer runs _before_
|
|
// the Semantic Analyzer, so Identifier -> Variable information is not yet available.
|
|
//
|
|
|
|
const constant := 1;
|
|
class Animal()
|
|
var constant := 2;
|
|
|
|
var foo;
|
|
endclass
|
|
|
|
// Must reference the class to get the parse tree visited.
|
|
Animal::foo;
|