What are the most common EK9 compiler errors and what do they mean?
← Debugging and Troubleshooting · Ref: Q983
The most common EK9 compiler errors:
E50001 NOT RESOLVED — a name (variable, type, or function) cannot be found. Likely a typo, missing import, or using := before <- to declare.
E50060 METHOD NOT RESOLVED — calling a method that does not exist on the type. Check the type API with 'ek9 -h TypeName'.
E05030 NOT OPEN TO EXTENSION — trying to extend a class that is closed by default. Add 'as open' to the base class or use composition.
E01072 RETURN NOT SUPPORTED — using 'return' which does not exist in EK9. Declare return variable with <- and the compiler ensures all paths initialise it.
E01073 NULL NOT SUPPORTED — using 'null' which does not exist in EK9. Use tri-state semantics with ? operator to check if a value is set.
E11031 NON DESCRIPTIVE NAME — using a banned variable name like 'temp', 'data', 'flag'. Use a descriptive name instead.
E08030 UNSAFE ACCESS — accessing a value that might be unset without checking first. Use a guard 'if v <- expr()' or check with v? before access.
Use 'ek9 -h Exxxxx' for detailed explanation of any error code.
Example
defines module qa.debugging.commonerrors defines function safeDivide() as pure -> numerator as Float denominator as Float <- rtn as Float: Float() if denominator? rtn: numerator / denominator defines program CommonErrorsDemo() stdout <- Stdout() // Correct: <- to declare, := to update greeting <- "Hello" greeting := "Hi there" stdout.println(greeting) // Correct: ? to check before use answer <- safeDivide(10.0, 3.0) if answer? stdout.println(`Result: ${answer}`) // Correct: guard instead of null check if safeAnswer <- safeDivide(10.0, 0.0) stdout.println(`Got: ${safeAnswer}`) else stdout.println("Division returned unset")
Common mistakes
E50001 — E50001 means the name is not resolved. If you used := before <-, the variable does not exist yet. Use <- to declare it first.
Incorrect:
greeting := "Hello"
Correct:
greeting <- "Hello"
Other ways to ask this
- Which EK9 error codes do I see most often?
- What do E50001, E50060, and E05030 mean in EK9?
- Quick reference for common EK9 compiler errors
Coming from another language?
Java developers most often hit E05030 (closed types) and E01072 (no return). Python developers hit E50001 (typos) and E11031 (banned names). All hit E01073 (no null) initially.
Keywords: error, common, troubleshoot, E05030, debug, E50060, E50001