CASC-Lang / Yakou

An experimental JVM Language inspired by Rust.
38 stars 2 forks source link

Enhance secondary constructor #12

Closed ChAoSUnItY closed 2 years ago

ChAoSUnItY commented 3 years ago
  1. Detect circular secondary constructor call then terminate compilation
  2. Since secondary constructor must implement primary or another secondary one, move the self call into a parsing rule.
ChAoSUnItY commented 3 years ago
  1. Will never happen due to compilation sequence.
  2. It's implemented through d695cad5f2e5a7f0d4c559154a3e2b57e49f9e58
ChAoSUnItY commented 3 years ago
  1. No, it's possible to happen and would occur StackOverFlow Exception
ChAoSUnItY commented 2 years ago

Closed due to outdated language spec, see #31, #32 for latest update