Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typechecker fails to match non-primitive return types inside tuple on function types #364

Closed
Bearmarshal opened this issue Apr 7, 2016 · 0 comments
Assignees

Comments

@Bearmarshal
Copy link

def fun() : (String, String) {
  ("413", "612")
}

class Main {
  def main() : void {
    let foo = fun : () -> (String, String);
  }
}

The above error fails compilation with the following error on the development branch:

Type '() -> (String, String)' does not match expected type '() -> (String, String)'
In expression: 
  fun
In expression: 
  fun : () -> (String, String)
In expression: 
  let foo = fun : () -> (String, String)
In expression: 
  {let foo = fun : () -> (String, String)}
In method 'main' of type 'void'
In class 'Main'

The error triggers with any non-primitive types inside the tuple. It does not happen with a non-tuple return type, or a tuple containing only primitives.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants