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

Using literals in postfix expressions fails in dartc #2439

Closed
DartBot opened this issue Apr 4, 2012 · 5 comments
Closed

Using literals in postfix expressions fails in dartc #2439

DartBot opened this issue Apr 4, 2012 · 5 comments
Assignees
Labels
area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion.
Milestone

Comments

@DartBot
Copy link

DartBot commented Apr 4, 2012

This issue was originally filed by [email protected]


Dartc is failing co19 tests like:
Language/10_Expressions/26_Postfix_Expressions_A01_t01

There are different tests that instantiate a literal function, map, or list and then try to use postfix operators on them. For example:

file:/home/zundel/dart/tests/co19/src/Language/10_Expressions/26_Postfix_Expressions_A01_t01.dart:76: Illegal assignment to non-assignable expression
    75: //mapLiteral
    76: try { {"1" : 1, "2" : 2}["1"]++; } catch(var e) {}

@kasperl
Copy link

kasperl commented Apr 17, 2012

Removed Area-Compiler label.
Added Area-Analyzer label.

@danrubel
Copy link

danrubel commented Jun 4, 2012

Added this to the M1 milestone.

@danrubel
Copy link

Set owner to @scheglov.

@scheglov
Copy link
Contributor

Actually this is parser problem.

FAILED: dartc-none release_ia32 co19/Language/10_Expressions/26_Postfix_Expressions_A01_t01
Expected: pass
Actual: fail

stderr:
(Extra arguments specified with -batch ignored.)
ERROR|PARSER|UNEXPECTED_TOKEN|file:/Users/scheglov/Source/Dart/dart/tests/co19/src/Language/10_Expressions/26_Postfix_Expressions_A01_t01.dart/26_Postfix_Expressions_A01_t01.dart|65|22|1|Unexpected token '.'
    64: try { void f() {} [0]; } catch(var e) {}
    65: try { void f() {}.x; } catch(var e) {} // issue #2709
                             ~
ERROR|PARSER|EXPECTED_TOKEN|file:/Users/scheglov/Source/Dart/dart/tests/co19/src/Language/10_Expressions/26_Postfix_Expressions_A01_t01.dart/26_Postfix_Expressions_A01_t01.dart|65|23|1|Unexpected token 'IDENTIFIER' (expected ';')
    64: try { void f() {} [0]; } catch(var e) {}
    65: try { void f() {}.x; } catch(var e) {} // issue #2709
                              ~
ERROR|PARSER|ILLEGAL_ASSIGNMENT_TO_NON_ASSIGNABLE|file:/Users/scheglov/Source/Dart/dart/tests/co19/src/Language/10_Expressions/26_Postfix_Expressions_A01_t01.dart/26_Postfix_Expressions_A01_t01.dart|66|25|1|Illegal assignment to non-assignable expression
    65: try { void f() {}.x; } catch(var e) {} // issue #2709
    66: try { void f() {} [0]++; } catch(var e) {} // issue #2709
                                ~
ERROR|PARSER|UNEXPECTED_TOKEN|file:/Users/scheglov/Source/Dart/dart/tests/co19/src/Language/10_Expressions/26_Postfix_Expressions_A01_t01.dart/26_Postfix_Expressions_A01_t01.dart|67|22|1|Unexpected token '.'
    66: try { void f() {} [0]++; } catch(var e) {} // issue #2709
    67: try { void f() {}.x--; } catch(var e) {} // issue #2709
                             ~
ERROR|PARSER|EXPECTED_TOKEN|file:/Users/scheglov/Source/Dart/dart/tests/co19/src/Language/10_Expressions/26_Postfix_Expressions_A01_t01.dart/26_Postfix_Expressions_A01_t01.dart|67|23|1|Unexpected token 'IDENTIFIER' (expected ';')
    66: try { void f() {} [0]++; } catch(var e) {} // issue #2709
    67: try { void f() {}.x--; } catch(var e) {} // issue #2709
                              ~
Compilation failed with 5 problems.

Command line: xcodebuild/ReleaseIA32/analyzer/bin/dart_analyzer --ignore-unrecognized-flags --error_format machine /Users/scheglov/Source/Dart/dart/tests/co19/src/Language/10_Expressions/26_Postfix_Expressions_A01_t01.dart
[00:00 | 100% | + 0 | - 1]


Set owner to @bwilkerson.

@bwilkerson
Copy link
Member

http://codereview.chromium.org/10823090/


Added Fixed label.

@DartBot DartBot added Type-Defect area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. labels Jul 31, 2012
@DartBot DartBot added this to the M1 milestone Jul 31, 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-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion.
Projects
None yet
Development

No branches or pull requests

5 participants