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

Class reserved word not honored #873

Closed
jtmcdole opened this issue Dec 15, 2011 · 4 comments
Closed

Class reserved word not honored #873

jtmcdole opened this issue Dec 15, 2011 · 4 comments
Labels
area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends.

Comments

@jtmcdole
Copy link
Contributor

Adding a new test and noticed the VM failed:

// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// Test that "class" cannot be used as identifier.

class foo {}
void main() {
  int class = 10; /// 01: compile-time error
  print("$class"); /// 02: compile-time error
}

@iposva-google
Copy link
Contributor

Matthias can you and Gilad determine whether the above example is legal Dart code or whether it should give a compile-time error as this test suggests.


Set owner to @mhausner.

@DartBot
Copy link

DartBot commented Dec 16, 2011

This comment was originally written by @mhausner


The checked-in grammar (dart/language/grammar/Dart.g) defines 'class' as a pseudo-keyword. The language spec calls these built-in identifiers. In the language spec, 'class' is not a built-in identifier but a proper keyword.

As it happens, Gilad just walked in and explained that 'class' is a keyword (more precisely: reserved word for future use) in ECMA script 5th edition and thus there is no need for us to treat it as a pseudo-keyword.

I will change the VM compiler to make it a proper keyword.

@DartBot
Copy link

DartBot commented Dec 16, 2011

This comment was originally written by @mhausner


Fixed @­2533.

@DartBot
Copy link

DartBot commented Dec 16, 2011

This comment was originally written by @mhausner


Really.


Added Fixed label.

@jtmcdole jtmcdole added Type-Defect area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. labels Dec 16, 2011
copybara-service bot pushed a commit that referenced this issue Sep 5, 2023
…ion, dartdoc, ecosystem, file, glob, html, http_multi_server, http_parser, json_rpc_2, mockito, package_config, protobuf, pub_semver, source_maps, source_span, sync_http, test_reflective_loader, usage, vector_math, web_socket_channel, webdriver

Revisions updated by `dart tools/rev_sdk_deps.dart`.

args (https://github.com/dart-lang/args/compare/da56b18..5a4e16f):
  5a4e16f  2023-09-01  dependabot[bot]  Bump actions/checkout from 3.5.3 to 3.6.0 (#254)

bazel_worker (https://github.com/dart-lang/bazel_worker/compare/f950bbf..159e671):
  159e671  2023-09-01  dependabot[bot]  Bump actions/checkout from 3.5.3 to 3.6.0 (#80)

benchmark_harness (https://github.com/dart-lang/benchmark_harness/compare/fde73cb..7d0d28e):
  7d0d28e  2023-09-01  dependabot[bot]  Bump actions/checkout from 3.5.3 to 3.6.0 (#92)

characters (https://github.com/dart-lang/characters/compare/ec844db..7633a16):
  7633a16  2023-09-01  dependabot[bot]  Bump actions/checkout from 3.5.3 to 3.6.0 (#86)

collection (https://github.com/dart-lang/collection/compare/1a9b7eb..91afde4):
  91afde4  2023-09-02  dependabot[bot]  Bump actions/checkout from 3.5.3 to 3.6.0 (#311)

dartdoc (https://github.com/dart-lang/dartdoc/compare/695b218..a32ba3a):
  a32ba3a1  2023-09-05  Parker Lougheed  Enable accidentally disabled reflective parameter test (#3490)
  0c0cb4ed  2023-09-04  dependabot[bot]  Bump actions/checkout from 3.5.3 to 4.0.0 (#3492)
  08d8d9c4  2023-09-01  Sam Rawlins  Implement much support for extension types (#3489)

ecosystem (https://github.com/dart-lang/ecosystem/compare/89e58de..2e6c3ec):
  2e6c3ec  2023-09-05  Hossein Yousefi  Fix Publish Workflow (#162)
  2e532e3  2023-09-01  dependabot[bot]  Bump actions/checkout from 3.5.3 to 3.6.0 (#161)

file (https://github.com/google/file.dart/compare/5d9a602..a18ad1c):
  a18ad1c  2023-09-01  dependabot[bot]  Bump actions/checkout from 3.5.2 to 3.6.0 (#228)

glob (https://github.com/dart-lang/glob/compare/5b24393..9c1996f):
  9c1996f  2023-09-01  dependabot[bot]  Bump actions/checkout from 3.5.3 to 3.6.0 (#82)

html (https://github.com/dart-lang/html/compare/4060496..a1b193e):
  a1b193e  2023-09-01  dependabot[bot]  Bump actions/checkout from 3.5.3 to 3.6.0 (#225)

http_multi_server (https://github.com/dart-lang/http_multi_server/compare/aa128cf..9d62ea3):
  9d62ea3  2023-09-01  dependabot[bot]  Bump actions/checkout from 3.5.3 to 3.6.0 (#57)

http_parser (https://github.com/dart-lang/http_parser/compare/c14fbf6..d2d03e7):
  d2d03e7  2023-09-02  dependabot[bot]  Bump actions/checkout from 3.5.3 to 3.6.0 (#77)

json_rpc_2 (https://github.com/dart-lang/json_rpc_2/compare/509f71e..50a3786):
  50a3786  2023-09-01  dependabot[bot]  Bump actions/checkout from 3.5.3 to 3.6.0 (#101)

mockito (https://github.com/dart-lang/mockito/compare/f5abf11..412c0be):
  412c0be  2023-09-01  dependabot[bot]  Bump actions/checkout from 3.5.3 to 3.6.0 (#692)

package_config (https://github.com/dart-lang/package_config/compare/981c49d..ae7ad83):
  ae7ad83  2023-09-01  dependabot[bot]  Bump actions/checkout from 3.5.3 to 3.6.0 (#140)

protobuf (https://github.com/dart-lang/protobuf/compare/5e8f36b..c16bc89):
  c16bc89  2023-09-01  dependabot[bot]  Bump actions/checkout from 3.5.2 to 3.6.0 (#873)

pub_semver (https://github.com/dart-lang/pub_semver/compare/028b435..f0be74a):
  f0be74a  2023-09-01  dependabot[bot]  Bump actions/checkout from 3.5.3 to 3.6.0 (#91)

source_maps (https://github.com/dart-lang/source_maps/compare/97c4833..eb3d40a):
  eb3d40a  2023-09-01  dependabot[bot]  Bump actions/checkout from 3.5.3 to 3.6.0 (#81)

source_span (https://github.com/dart-lang/source_span/compare/37735ae..48d0f57):
  48d0f57  2023-09-01  dependabot[bot]  Bump actions/checkout from 3.5.3 to 3.6.0 (#101)

sync_http (https://github.com/dart-lang/sync_http/compare/c3d6ad4..8233f74):
  8233f74  2023-09-01  Devon Carew  Merge pull request #37 from google/dependabot/github_actions/actions/checkout-3.6.0
  57dc02b  2023-09-01  dependabot[bot]  Bump actions/checkout from 3.5.2 to 3.6.0

test_reflective_loader (https://github.com/dart-lang/test_reflective_loader/compare/0bfaad9..45c57d6):
  45c57d6  2023-09-01  dependabot[bot]  Bump actions/checkout from 3.5.3 to 3.6.0 (#51)

usage (https://github.com/dart-lang/usage/compare/09bb847..7b12d51):
  7b12d51  2023-09-01  dependabot[bot]  Bump actions/checkout from 3.5.3 to 3.6.0 (#197)

vector_math (https://github.com/google/vector_math.dart/compare/88bada3..d54af8a):
  d54af8a  2023-09-01  dependabot[bot]  Bump actions/checkout from 3.5.2 to 3.6.0 (#301)

web_socket_channel (https://github.com/dart-lang/web_socket_channel/compare/4d1b543..af945f1):
  af945f1  2023-09-01  dependabot[bot]  Bump actions/checkout from 3.5.3 to 3.6.0 (#283)

webdriver (https://github.com/google/webdriver.dart/compare/20ec47f..21976d6):
  21976d6  2023-09-01  dependabot[bot]  Bump actions/checkout from 3.5.2 to 3.6.0 (#279)
  352b9b6  2023-09-01  dependabot[bot]  Bump nanasess/setup-chromedriver from 1.1.0 to 2.2.0 (#278)

Change-Id: I0b1f7a8851a7ee992d5b67a221ab523f55b51240
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/324261
Auto-Submit: Devon Carew <[email protected]>
Reviewed-by: Konstantin Shcheglov <[email protected]>
Commit-Queue: Konstantin Shcheglov <[email protected]>
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, and the AOT and JIT backends.
Projects
None yet
Development

No branches or pull requests

3 participants