Skip to content

Latest commit

 

History

History
25 lines (20 loc) · 810 Bytes

ContextAnalysis.md

File metadata and controls

25 lines (20 loc) · 810 Bytes

Context Analysis Checks

  • No variables are used before their declaration
  • Re-declarations of variables/members
  • no two main methods
  • val/var checks
  • this only allowed inside type/object

Methods

  • single return allowed
  • returned expression type == method type
  • parameter types == argument types
  • Method names conflicts & overloading

Traits and Objects

  • No property initializations allowed in traits
  • methods with empty block of traits need to be overridden
  • properties are overridden
  • overridden members have same types
  • declared and evaluated property type must match
  • traits cannot be instantiated
  • polymorphic property assignments (promotion types)
  • polymorphic method calls and assignments (promotion types)