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

issues with DDC's strong mode #1892

Closed
devoncarew opened this issue Sep 25, 2015 · 1 comment
Closed

issues with DDC's strong mode #1892

devoncarew opened this issue Sep 25, 2015 · 1 comment
Assignees

Comments

@devoncarew
Copy link
Member

The getter 'name' is not defined for the class 'Token' (lib/src/parser.dart, line 257, col 47)
The getter 'name' is not defined for the class 'Token' (lib/src/parser.dart, line 264, col 22)
The method 'expand' is not defined for the class 'SourceSpan' (lib/src/parser.dart, line 265, col 19)
The method 'expand' is not defined for the class 'SourceSpan' (lib/src/parser.dart, line 271, col 19)
The method 'expand' is not defined for the class 'SourceSpan' (lib/src/parser.dart, line 300, col 16)
The getter 'style' is not defined for the class 'Token' (lib/src/parser.dart, line 306, col 32)
The method 'expand' is not defined for the class 'SourceSpan' (lib/src/parser.dart, line 311, col 16)
The getter 'value' is not defined for the class 'Token' (lib/src/parser.dart, line 311, col 42)
The getter 'style' is not defined for the class 'Token' (lib/src/parser.dart, line 311, col 55)
The method 'expand' is not defined for the class 'SourceSpan' (lib/src/parser.dart, line 318, col 16)
The method 'expand' is not defined for the class 'SourceSpan' (lib/src/parser.dart, line 325, col 16)
The method 'expand' is not defined for the class 'SourceSpan' (lib/src/parser.dart, line 332, col 16)
The method 'expand' is not defined for the class 'SourceSpan' (lib/src/parser.dart, line 340, col 16)
The getter 'style' is not defined for the class 'Token' (lib/src/scanner.dart, line 446, col 56)

@nex3, @jmesserly, I believe these issues are all related. I'm not sure if they're real issues or if DDC's type promotion needs to be improved.

@jmesserly
Copy link

fyi, I'm working (slowly) on these.

More discussion of the type promotion ones is in this (closed) bug: dart-archive/dev_compiler#343

What is happening is there was no type promotion going on at all. Instead because "var" means "dynamic" in Dart, all warnings are suppressed. And the reason type promotion is disabled is because of an assignment to the variable in a closure, so type promotion doesn't know if the variable has been mutated or not.

With DDC, we infer the type of the "var" and so we start to get warnings.

Anyway I'll see what I can do there. Possibly a tweak to avoid the mutation will make type promotion work as expected.

@jmesserly jmesserly self-assigned this Sep 25, 2015
jmesserly referenced this issue in dart-lang/yaml Sep 29, 2015
most of it was refactoring to avoid an assignment in a closure, which disabled type promotion
nex3 referenced this issue in dart-lang/yaml Oct 2, 2015
fixes #15, strong mode errors
mosuem referenced this issue Dec 11, 2024
fixes dart-lang/yaml#15, strong mode errors
@mosuem mosuem transferred this issue from dart-lang/yaml Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants