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

VM fails language/built_in_identifier_prefix_test #6970

Closed
peter-ahe-google opened this issue Nov 27, 2012 · 4 comments
Closed

VM fails language/built_in_identifier_prefix_test #6970

peter-ahe-google opened this issue Nov 27, 2012 · 4 comments
Labels
area-vm Use area-vm for VM related issues, including code coverage, FFI, and the AOT and JIT backends. closed-as-intended Closed as the reported issue is expected behavior

Comments

@peter-ahe-google
Copy link
Contributor

FAILED: none-vm release_ia32 language/built_in_identifier_prefix_test
Expected: pass
Actual: fail

stderr:
'file:///Users/ahe/Dart/all/dart/tests/language/built_in_identifier_prefix_test.dart': Error: line 45 pos 1: unexpected token 'abstract'
abstract.A _abstract = new abstract.A();
^

Command line: xcodebuild/ReleaseIA32/dart --ignore-unrecognized-flags --package-root=xcodebuild/ReleaseIA32/packages/ /Users/ahe/Dart/all/dart/tests/language/built_in_identifier_prefix_test.dart

@peter-ahe-google
Copy link
Contributor Author

This test will be submitted as https://codereview.chromium.org/11106011/.

@iposva-google
Copy link
Contributor

Removed Priority-Medium label.
Added Priority-Unassigned label.

@peter-ahe-google peter-ahe-google added Type-Defect area-vm Use area-vm for VM related issues, including code coverage, FFI, and the AOT and JIT backends. labels Jun 5, 2013
@mhausner
Copy link
Contributor

Looking at the test and its comments, I'd say this is more an issue of an oversight in the language spec.

// From The Dart Programming Language Specification, section 11.30
// "Identifier Reference":
//
// "A built-in identifier is one of the identifiers produced by the
// production BUILT IN IDENTIFIER. It is a compile-time error if a
// built-in identifier is used as the declared name of a class, type
// parameter or type alias. It is a compile-time error to use a
// built-in identifier other than dynamic as a type annotation."
//
// Observation: it is not illegal to use a built-in identifier as a library
// prefix.
//
// Observation: it is not legal to use a built-in identifer as a type
// annotation. A type annotation is not fully defined in the
// specification, so we assume this means that the grammar production
// "type" cannot match a built-in identifier. Unfortunately, this
// doesn't prevent us from using built-in identifiers *in* type
// annotations. For example, "final abstract foo;" is illegal as
// "abstract" is used as a type annotation. However, "final
// abstract<dynamic> foo;" is not illegal because "abstract" is used
// as a typeName.

@mhausner mhausner added the closed-as-intended Closed as the reported issue is expected behavior label Jan 22, 2016
@mhausner
Copy link
Contributor

In fact, the Spec has changed since this bug was filed. It now also expressly forbids to use built-in identifiers as prefixes.

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. closed-as-intended Closed as the reported issue is expected behavior
Projects
None yet
Development

No branches or pull requests

4 participants