E50060: method/function not resolved
What went wrong
The compiler cannot find a method matching both the NAME and PARAMETER TYPES you specified. EK9 requires exact parameter type matches.
Worked examples
Compilable examples demonstrating this error and the correct fix:
Debugging method chains
Break the chain to find where it fails: take each call's result into a variable of its own, then ask of each one what type it is, and whether that type has the next method in the chain.
How to fix it
- Check exact method name spelling
- Check parameter types match exactly (EK9 doesn't auto-convert)
- For overloaded methods, ensure you're using correct overload
- For chains, check what each step returns
Common causes
- Method name typo
- Wrong parameter type (no matching overload)
- Wrong parameter count
- In chains: intermediate step returns different type than expected
- Constructor call with arguments that don't match any declared constructor (especially when passing an undeclared type or a literal of the wrong numeric kind as a constructor argument)
- Constructing a Panic: 'Panic(...)' (any arguments, or none) is this error, because Panic has no constructors EK9 code can call - only the language raises one. Use require or a constrained type, or throw an Exception with the exit code you want (ek9 -q 1434)
Cascade note
E50060 on a constructor call typically causes E50010 ('type not resolved') on every subsequent use of the variable being constructed: when 'Order(money, "Alice")' matches no constructor, the variable it initialises has no type, so printing it and reading its fields each report E50010 as well.
Fix the constructor call first and the cascaded E50010 errors disappear. Counting 'errors-to-fix' by totalling the compiler output will overstate the work required — the downstream errors are symptoms, not separate bugs.
See also
- E50060: method not found (this error)
- E06180: method exists but not accessible (private/protected)
- E07620: operator not defined on type
- E06140: multiple methods match equally well (ambiguous)
https://ek9.io/methods.html https://ek9.io/forAI.json#$.methodResolution
Examples
Every example is compiled by the EK9 compiler: the first fails exactly as captioned, the others fix it.
Fails with E50060: method/function not resolved
#!ek9 defines module error.e50060.bad defines class Counter describe() -> count as Integer <- rtn as String: $count defines function demo() <- rtn as String? counter <- Counter() rtn: counter.describeAll()
Fixed: Call a method that exists, with the arguments it declares
#!ek9 defines module error.e50060.good defines class Counter describe() -> count as Integer <- rtn as String: $count defines function demo() <- rtn as String? counter <- Counter() rtn: counter.describe(42)
Questions and answers
These Q&A entries show E50060 and its fix:
- Q2: How do I compile and run an EK9 program?
- Q4: How do I read input from the user?
- Q12: How do I install EK9?
- Q18: How do I add comments to my code?
- Q20: What file extension does EK9 use?
- Q21: How do I get help on a specific EK9 type or keyword?
- Q27: Is EK9 statically or dynamically typed?
- Q31: How do I work with Date and Time?
- Q32: How do I work with Duration?
- Q33: How do I work with regular expressions?
- Q34: How do I work with colours?
- Q35: How do I work with money and currency in EK9?
- Q36: How do I work with measurements and units in EK9?
- Q38: How do I work with characters in EK9?
- Q40: How does the Bits type work in EK9?
- Q41: How does the Millisecond type work in EK9 and how does it relate to Duration?
- Q44: How does the Locale type work in EK9 and how do I format values for different regions?
- Q46: How does the Dict type work in EK9?
- Q59: How do I use functions in stream pipelines?
- Q85: How do I use Optional in stream pipelines?
- Q88: What operations does List support in EK9?
- Q90: What operations does Dict support in EK9?
- Q92: How does DateTime work with timezones in EK9?
- Q95: How do I control field visibility in EK9?
- Q96: How do operators work in EK9?
- Q97: What is the difference between classes and records in EK9?
- Q100: How do EK9 enumerations differ from Java enums?
- Q102: How do I make a class extensible with 'as open'?
- Q106: What are traits and how do I use them in EK9?
- Q110: What is the difference between a trait and an abstract class?
- Q112: How do services work in EK9 for REST and HTTP?
- Q116: What does 'default operator' generate?
- Q117: How do I create a singleton in EK9?
- Q118: How do I implement the builder pattern in EK9?
- Q119: What EK9 constructs are available and when should I use each?
- Q120: How do I sort a collection in EK9?
- Q121: How does PriorityQueue work in EK9?
- Q122: How do I use collect as to aggregate stream results in EK9?
- Q123: How do I flatten nested collections and optionals in EK9?
- Q124: How do I group and aggregate collection data in EK9?
- Q125: How do I use head, tail, and skip to limit streams in EK9?
- Q126: How do I choose the right collection type in EK9?
- Q128: Why can't I extend List or Dict in EK9?
- Q129: What happens when I access a Dict key that doesn't exist in EK9?
- Q130: Are collections mutable or immutable in EK9?
- Q131: What is the EK9 equivalent of Python list comprehensions?
- Q132: What is the EK9 equivalent of the Java Collections Framework?
- Q133: How do I use tee and uniq in stream pipelines in EK9?
- Q134: How do I use try/catch to handle exceptions in EK9?
- Q135: How does try/catch/finally work in EK9?
- Q136: How do I throw exceptions in EK9?
- Q137: How do I manage resources with try-with-resources in EK9?
- Q138: How do I catch specific exception types in EK9?
- Q139: When should I use try/catch vs Result for error handling?
- Q140: How do I define constants in EK9?
- Q142: How do I use constants across modules in EK9?
- Q146: How do I structure functions without early return in EK9?
- Q149: Why does EK9 have a built-in Money type and how does it handle currency safety?
- Q150: How do I convert currencies and format money for display in EK9?
- Q151: How do I read a text file in EK9?
- Q152: How do I write text to a file in EK9?
- Q153: How do I check if a file or directory exists in EK9?
- Q154: How do I read a file line by line in EK9?
- Q155: How do I write a unit test in EK9?
- Q156: How do I assert conditions in a test in EK9?
- Q157: How do I run tests and see results in EK9?
- Q159: How do I run code concurrently or in parallel in EK9?
- Q160: Does EK9 have async/await, goroutines, or manual thread management?
- Q161: How do I safely get a value from a Dict when the key might not exist?
- Q162: How do I safely access a List element by index?
- Q163: How do I safely unwrap an Optional value?
- Q164: How do I safely extract the ok or error value from a Result?
- Q165: Why don't Dict and List have a .get() method in EK9?
- Q166: What is the consistent safe-access pattern across all EK9 types?
- Q169: How do I process an Optional or Result value using callbacks?
- Q170: How do I get the length of a string in EK9?
- Q171: How do I check if a string contains a substring in EK9?
- Q172: How do I convert a string to uppercase or lowercase in EK9?
- Q173: How do I trim whitespace from a string in EK9?
- Q175: How do I replace or transform text in a string in EK9?
- Q176: How do I pad a string to a fixed width in EK9?
- Q177: How do I check if a string starts or ends with a value in EK9?
- Q178: How do I get the first or last character of a string in EK9?
- Q179: How do I compare strings for fuzzy or approximate matching in EK9?
- Q180: How do I add an item to a list in EK9?
- Q181: How do I remove an item from a list in EK9?
- Q182: How do I get the size of a List or Dict, or check whether it is empty?
- Q183: How do I get the first or last item from a list in EK9?
- Q185: How do I check if any or all items match a condition in EK9?
- Q186: How do I merge two lists or two dicts in EK9?
- Q187: How do I reverse a list in EK9?
- Q188: How does EK9 handle JSON as a built-in type?
- Q189: How do I convert an EK9 object to JSON?
- Q190: How do I parse a JSON string in EK9?
- Q193: How do I format JSON output in EK9?
- Q195: How do I constrain generic type parameters in EK9?
- Q199: How do I create a REST GET endpoint in EK9?
- Q200: How do EK9 operators map to HTTP methods for CRUD?
- Q201: How do I create HTTP responses in EK9 services?
- Q202: How do I bind path parameters and request body in EK9 services?
- Q203: How do I wire services and components together in an EK9 application?
- Q211: How do I implement double dispatch in EK9?
- Q212: How do I apply the composition-over-inheritance pattern in EK9?
- Q215: How does the 'sanitized' parameter modifier work in EK9?
- Q218: What are the security best practices in EK9?
- Q219: What do I get for free with an EK9 enumeration?
- Q220: How do I navigate between enum values in EK9?
- Q221: How can I compare an enum directly to a string in EK9?
- Q222: What happens when an EK9 enum is unset?
- Q223: How do I create a subset of enum values in EK9?
- Q224: How do I use enums with stream pipelines in EK9?
- Q225: How do I associate data or behaviour with enum values in EK9?
- Q226: How does EK9 prevent common enum bugs?
- Q227: How does EK9 validate dependency injection at compile time?
- Q230: What happens if I forget to register a dependency in EK9?
- Q231: How do programs connect to applications for dependency injection?
- Q236: How do I create a custom iterator so my type works with cat and for-in?
- Q238: What operators does EK9 support and why is the set fixed?
- Q240: How do arithmetic and mathematical operators work in EK9?
- Q242: How do conversion and introspection operators work in EK9?
- Q247: How do I read EK9 compiler error messages?
- Q248: What does a specific EK9 error code mean?
- Q249: How do I use the language server for error detection?
- Q251: Why does the compiler say my variable is unset?
- Q253: What do the compiler phases mean?
- Q254: What is the Any type and when should I use it?
- Q256: What is the Void type in EK9?
- Q257: How do constrained types work in EK9?
- Q279: Why does AI confuse EK9 operators with other languages?
- Q280: Why does AI generate getters and setters in EK9?
- Q293: What are the naming conventions for types in EK9?
- Q294: What are the naming conventions for functions in EK9?
- Q308: How do I handle different exception types in EK9 without casting?
- Q536: How do I get the current date and time in EK9?
- Q537: How do I format a date for display in EK9?
- Q539: How do I calculate the difference between two dates in EK9?
- Q540: How do I add or subtract time from a date in EK9?
- Q541: How do I handle timezones in EK9?
- Q542: How do I compare dates in EK9?
- Q543: How do I work with Unix timestamps in EK9?
- Q545: How do I convert a DateTime to a different timezone in EK9?
- Q546: What is the difference between withSameInstant() and withZone() in EK9?
- Q547: How should I store dates in EK9 — UTC or local time?
- Q548: How do I compare DateTimes across different timezones in EK9?
- Q549: How do I format dates for different locales in EK9?
- Q550: How do I handle calendar edge cases like month-end and leap years in EK9?
- Q551: How do I generate RFC 7231 HTTP date headers in EK9?
- Q552: How does Date promote to DateTime in EK9?
- Q553: What are common timezone mistakes and how does EK9 prevent them?
- Q554: How do I extract date and time components from a DateTime in EK9?
- Q581: How do I call a parent constructor using super()?
- Q584: When is an explicit super() call required?
- Q587: How do constructors work in multi-level class hierarchies?
- Q596: What is the difference between a function and a method in EK9?
- Q597: How do function parameters work in EK9?
- Q599: Why doesn't EK9 have variable arguments (varargs)?
- Q601: How do dynamic functions replace nested functions in EK9?
- Q603: How does EK9 detect multi-level circular inheritance chains?
- Q604: Do traits, records, and components also check for circular hierarchies?
- Q605: What does 'this' mean inside a standalone function, and why can't I reach fields through it?
- Q609: Can sealed enforcement work across module boundaries?
- Q611: What is the full set of type hierarchy checks EK9 performs?
- Q616: What is dispatcher ambiguity and how is it detected?
- Q617: How can trait diamond patterns cause dispatcher ambiguity?
- Q618: How do sealed dispatchers enforce exhaustive handler coverage?
- Q620: How does dispatcher resolution work across a class hierarchy?
- Q621: What is the complete set of dispatcher compile-time checks?
- Q623: How do I format all EK9 source files in my project?
- Q625: Why does EK9 enforce a single standard format?
- Q628: How do I profile my EK9 tests?
- Q635: What operations are forbidden inside a pure method?
- Q646: Where is type inference not supported in generic type and function bodies?
- Q653: Why is List of Circle not compatible with List of Shape?
- Q661: Why can sanitized only be used on incoming String parameters?
- Q663: Can an override add or drop 'sanitized' on a parameter?
- Q681: What is the correct syntax for generic type parameterization and instantiation?
- Q683: What are the complete constructor rules for generic types?
- Q686: Must an override keep the 'sanitized' modifier of its parent?
- Q687: How should Result values be accessed safely using guards?
- Q689: What are the correct patterns for boolean conditions and comparisons?
- Q694: When must named arguments be used in function calls?
- Q695: Why must comparison values use named constants instead of bare literals?
- Q696: How does EK9 enforce complexity limits and what triggers E11010?
- Q700: What are the parameter count and line length limits in EK9?
- Q701: What is the Sensitive type in EK9?
- Q716: How do arithmetic operators work on constrained types?
- Q717: How do comparison operators work between constrained types and their base types?
- Q718: How do I extract the base type value from a constrained type?
- Q719: How do copy, replace, and merge operators work with constrained types?
- Q720: What built-in types can be constrained in EK9?
- Q721: How do I use constrained types as function parameters for type safety?
- Q722: How do constrained types relate to the type hierarchy?
- Q723: Why does EK9 reject name$ instead of $name?
- Q724: Why does EK9 reject ?name instead of name?
- Q725: Why must methods come before operators in an EK9 class?
- Q733: What is the combined complexity-size check and when does it trigger?
- Q734: How does EK9 detect redundant Boolean comparisons and logical tautologies?
- Q735: How does EK9 detect conditions that are always true or always false?
- Q736: How does EK9 detect redundant empty and isSet checks?
- Q737: Why does EK9 reject reassignment in pure functions and parameter reassignment?
- Q739: How does EK9 detect duplicate names and properties in type hierarchies?
- Q740: How does EK9 detect duplicate trait references and service path conflicts?
- Q741: How does EK9 detect reference conflicts and unresolved references?
- Q742: How does EK9 detect when a function type or generic type is used incorrectly?
- Q743: What are the restrictions on this and super in EK9?
- Q745: How does EK9 validate function and method parameters?
- Q746: How do I migrate Swift enum associated values to EK9?
- Q747: How do I migrate Swift optional binding chains to EK9?
- Q748: How do I migrate Swift control flow patterns to EK9?
- Q781: Why does EK9 reject calls with the wrong number of arguments?
- Q913: How does $ work on different types in EK9?
- Q919: What is the complete # operator family in EK9?
- Q966: What does the #? hashcode operator do in EK9?
- Q978: How do I transform items and collect the results in EK9?
- Q988: Review this EK9 code. Should the loop be a stream pipeline instead?
- Q994: How do I convert a value to a String in EK9?
- Q995: How do I make my own class work with the $ operator in EK9?
- Q1003: What method does each EK9 operator call internally?
- Q1010: In Python I use dict for key-value pairs. How do dictionaries work in EK9?
- Q1014: In Python I use try/except for error handling. How does EK9's try/catch compare?
- Q1019: Is an empty List set or unset in EK9? What about an empty Dict?
- Q1034: Write a function that transforms a list of names to uppercase.
- Q1035: Write code to filter a list and collect the results into a new list.
- Q1056: Is the $ operator the same as string interpolation in EK9?
- Q1058: What is the difference between :=: :^: and :~: in EK9?
- Q1060: Are record fields public or private in EK9?
- Q1062: I need a simple one-off function to transform items in a stream pipeline.
- Q1074: How do I use a constrained type as a field in a record?
- Q1075: Copy all fields from one record to another.
- Q1077: Merge only the set fields from one record into another.
- Q1078: Replace all content in a List with another List.
- Q1081: Merge two lists together using :~: operator.
- Q1082: Compare two Product records by price.
- Q1083: Check if two Config records have identical values.
- Q1085: Sort a list of Employee records by salary.
- Q1086: Find the cheapest product in a list.
- Q1094: Convert a Customer record to both display string and JSON format.
- Q1096: Verify that two equal objects produce the same hashcode.
- Q1100: Check if an email string matches a basic pattern.
- Q1106: Copy a component and check if the copy equals the original.
- Q1132: Call a specific trait's method implementation using TraitName.method() syntax.
- Q1134: Filter positive numbers, double them, and sort the result.
- Q1137: Remove duplicate integers from a list using sort and uniq.
- Q1138: Take the first 3, last 2, and skip the first 2 items from a list.
- Q1141: Filter a list of fruit names to those longer than 4 characters, then uppercase them.
- Q1142: Sum the prices of all products over 20 using a stream pipeline.
- Q1143: Take the first 3 positive numbers from a mixed list.
- Q1160: Add, access, and remove items from a List of strings.
- Q1162: Remove all negative numbers from a list, keeping only positives.
- Q1163: Find the common elements between two lists of names.
- Q1165: Split a comma-separated string into a list of fields.
- Q1169: Apply two transformations in sequence: double a number then add ten.
- Q1173: Increment a date and calculate whether two dates differ.
- Q1175: Define a Product record with name, price, and a constructor.
- Q1178: Create a Dict, add entries with DictEntry, and look up values with getOrDefault.
- Q1179: Create a Dict with a curly-brace {key: value} literal, then add entries using DictEntry.
- Q1185: Define a Percentage type constrained to values between 0 and 100.
- Q1186: How do I compare two dates and determine which is earlier?
- Q1187: How do I check if a meeting time is before noon in EK9?
- Q1188: How do I compare two durations and find the shorter one using coalescing?
- Q1190: How do I check if two colours are equal and convert a colour to its string representation?
- Q1191: How do I compare two dimensions and determine which is longer?
- Q1194: How do I compare two timeout values in milliseconds in EK9?
- Q1197: How do I sort a list of dates in ascending order using a stream pipeline?
- Q1200: Sum the line totals of an order where each line has a quantity and unit price in Money.
- Q1202: Calculate the time gap between two scheduled events.
- Q1203: Filter a product list to items over 50 USD and sort by price ascending.
- Q1206: Categorise a dimension measurement as small, medium, or large using named thresholds.
- Q1209: Select the cheaper of two price quotes where one vendor hasn't responded.
- Q1211: Find the earlier meeting time from two optional schedule slots.
- Q1214: Find the highest bid from two optional auction offers.
- Q1215: Determine the latest expiry date from two optional certificates.
- Q1233: Process a list of optional sensor readings and select the minimum using stream join with <?.
- Q1261: Show me how to use ++ on a Date to advance one day at a time, iterating through a week starting from a known date.
- Q1262: Show me how to use ++ on an enumeration to walk through ProcessState values (Pending → Running → Complete), demonstrating that walking past the last value makes the variable unset.
- Q1264: Walk me through using :=? on an Integer retry counter so that the counter only gets initialised on the first call and is preserved on subsequent calls.
- Q1265: How can I record a 'first seen' Date that is set on the first observation and never overwritten on subsequent observations, using :=?
- Q1266: Show me how to use :=? on a custom class field — give me a worked example where a UserSession class has a sessionToken that is set on first login and never overwritten.
- Q1370: Why does reading a file with TextFile.input() give me unset lines?
- Q1386: How do I hash data in EK9, and what is the difference between Digest and HMAC?
- Q1387: How do I compute an HMAC in EK9, and how do I verify one safely?
- Q1388: How do I generate a secure random token, nonce or salt in EK9?
- Q1406: How do I combine partial results from several tasks into the fullest Dict?
- Q1432: How do I end my program with a chosen exit code when something fails?
- Q1920: How do I see the close failures that were suppressed onto the exception I caught?
- Q2100: How do I make a deep or selective copy of an object?