Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(565)

Issue 11040063: Do not allow platform prefices to conflict with fixed members. (Closed)

Created:
8 years, 2 months ago by Anton Muhin
Modified:
8 years, 2 months ago
Reviewers:
Roman
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Do not allow platform prefices to conflict with fixed members. Currently when generating prefices for platform libs we can generate a name which equals to some fixed member. Example, there is ImageElement.x getter in dart:html which makes 'x' into a set of forbidden member names. Now imagine the class: import 'dart:math' as math; class Foo { get x => null; f() => math.cos(.5); } We retain 'x', but we can generate 'x' as a prefix for dart:math emitting: import 'dart:math' as x; class C { get x => null; f() => x.cos(.5); } Caboooooom! R=smok@google.com BUG=5674 Committed: https://code.google.com/p/dart/source/detail?r=13468

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+3 lines, -5 lines) Patch
M lib/compiler/implementation/dart_backend/renamer.dart View 2 chunks +3 lines, -5 lines 0 comments Download

Messages

Total messages: 2 (0 generated)
Anton Muhin
8 years, 2 months ago (2012-10-05 17:35:25 UTC) #1
Roman
8 years, 2 months ago (2012-10-10 11:26:44 UTC) #2
lgtm

Looks like writing a test should be easy? :)

Powered by Google App Engine
This is Rietveld 408576698