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

"Unexpected Tolken ':'" when using named parameters in VM #1199

Closed
DartBot opened this issue Jan 17, 2012 · 4 comments
Closed

"Unexpected Tolken ':'" when using named parameters in VM #1199

DartBot opened this issue Jan 17, 2012 · 4 comments
Labels
area-vm Use area-vm for VM related issues, including code coverage, FFI, and the AOT and JIT backends.

Comments

@DartBot
Copy link

DartBot commented Jan 17, 2012

This issue was originally filed by @butlermatt


What steps will reproduce the problem?

  1. Use simple code such as the following:

hello(msg, to, [from, rate]) => '${from} sent ${msg} to ${to} via ${rate}';

main() => print(hello('world', 'Seth', from:'Bob', rate:'First Class'));

(Taken from Seth Ladd's blog post on functions)

  1. Try to run sample in dartVM:
    dart Test.dart

What is the expected output? What do you see instead?
Expected to see:
"Bob sent world to Seth via First Class"

Received:
Error: line 3 pos 44: unexpected token ':'
main() => print(hello('world', 'Seth', from:'Bob', rate:'First Class'));

What version of the product are you using? On what operating system?
Using Pre-built SDK from:
http://gsdview.appspot.com/dart-editor-archive-integration/latest/
File: dart-linux.zip (Timestamp 16-Jan-2012 18:43)

Ubuntu 11.10 64-bit

Please provide any additional information below.
This works as expected in dartboard, compiles as expected with frogc.

@floitschG
Copy link
Contributor

Issue #1205 has been merged into this issue.

@floitschG
Copy link
Contributor

As described in issue #1295: this happens with top-level functions that use '=>'.


Added Area-VM, Triaged labels.

@DartBot
Copy link
Author

DartBot commented Jan 18, 2012

This comment was originally written by @mhausner


Indeed. Fix will be out soon.


Set owner to @mhausner.

@DartBot
Copy link
Author

DartBot commented Jan 19, 2012

This comment was originally written by @mhausner


Fixed at CL 3422.


Added Fixed label.

@DartBot DartBot added Type-Defect area-vm Use area-vm for VM related issues, including code coverage, FFI, and the AOT and JIT backends. labels Jan 19, 2012
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-vm Use area-vm for VM related issues, including code coverage, FFI, and the AOT and JIT backends.
Projects
None yet
Development

No branches or pull requests

2 participants