-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Open
Labels
P3A lower priority bug or feature requestA lower priority bug or feature requestarea-dart-modelFor issues related to conformance to the language spec in the parser, compilers or the CLI analyzer.For issues related to conformance to the language spec in the parser, compilers or the CLI analyzer.dart-model-analyzer-specIssues with the analyzer's implementation of the language specIssues with the analyzer's implementation of the language specos-windowstype-bugIncorrect behavior (everything from a crash to more subtle misbehavior)Incorrect behavior (everything from a crash to more subtle misbehavior)
Description
Copying this from Dart-Code/Dart-Code#261 as I don't think it's specific to Dart Code (however, I can't explain why Atom or DartAnalyzer wouldn't show the same issue).
Here is a smaller repro than attached to the Dart Code issue, it's basically:
lib/a.dart
import 'package:repro/b.dart';
class Renderer
{
}
class Mesh extends Renderable
{
@override
void render(Renderer r)
{
}
}lib/b.dart
import 'package:repro/a.dart';
abstract class Renderable
{
void render(Renderer r);
}There's also a pubspec with just a name and I've run pub get.
The error reported is:
file: 'file:///c%3A/Users/danny/Desktop/repro/repro/lib/a.dart'
severity: 'Error'
message: 'Invalid override. The type of 'Mesh.render' ('(Renderer) → void') isn't a subtype of 'Renderable.render' ('(Renderer) → void').'
at: '11,5'
source: 'dart'
There's only one Renderer class so it seems like these should be the same and the error is incorrect, however the files reference each other, I'm not sure if that's supported?
The log from the AS server is this:
[11:47:34]: ==> {"id":"1","method":"server.setSubscriptions","params":{"subscriptions":["STATUS"]}}
[11:47:34]: ==> {"id":"2","method":"analysis.setAnalysisRoots","params":{"included":["c:\\Users\\danny\\Desktop\\repro\\repro"],"excluded":[]}}
[11:47:34]: <== {"event":"server.connected","params":{"version":"1.17.0","pid":12036,"sessionId":""}}
[11:47:34]: <== {"id":"1"}
[11:47:34]: <== {"event":"server.status","params":{"pub":{"isListingPackageDirs":true}}}
[11:47:34]: <== {"event":"server.status","params":{"pub":{"isListingPackageDirs":false}}}
[11:47:35]: <== {"id":"2"}
[11:47:35]: <== {"event":"server.status","params":{"analysis":{"isAnalyzing":true}}}
[11:47:35]: <== {"event":"analysis.errors","params":{"file":"c:\\Users\\danny\\Desktop\\repro\\repro\\lib\\a.dart","errors":[]}}
[11:47:35]: <== {"event":"analysis.errors","params":{"file":"c:\\Users\\danny\\Desktop\\repro\\repro\\lib\\a.dart","errors":[{"severity":"ERROR","type":"COMPILE_TIME_ERROR","location":{"file":"c:\\Users\\danny\\Desktop\\repro\\repro\\lib\\a.dart","offset":113,"length":39,"startLine":11,"startColumn":5},"message":"Invalid override. The type of 'Mesh.render' ('(Renderer) → void') isn't a subtype of 'Renderable.render' ('(Renderer) → void').","code":"strong_mode_invalid_method_override","hasFix":false}]}}
[11:47:35]: <== {"event":"analysis.errors","params":{"file":"c:\\Users\\danny\\Desktop\\repro\\repro\\lib\\a.dart","errors":[{"severity":"ERROR","type":"COMPILE_TIME_ERROR","location":{"file":"c:\\Users\\danny\\Desktop\\repro\\repro\\lib\\a.dart","offset":113,"length":39,"startLine":11,"startColumn":5},"message":"Invalid override. The type of 'Mesh.render' ('(Renderer) → void') isn't a subtype of 'Renderable.render' ('(Renderer) → void').","code":"strong_mode_invalid_method_override","hasFix":false}]}}
[11:47:35]: <== {"event":"analysis.errors","params":{"file":"c:\\Users\\danny\\Desktop\\repro\\repro\\lib\\b.dart","errors":[]}}
[11:47:35]: <== {"event":"analysis.errors","params":{"file":"c:\\Users\\danny\\Desktop\\repro\\repro\\lib\\b.dart","errors":[]}}
[11:47:35]: <== {"event":"analysis.errors","params":{"file":"c:\\Users\\danny\\Desktop\\repro\\repro\\lib\\b.dart","errors":[]}}
[11:47:35]: <== {"event":"server.status","params":{"analysis":{"isAnalyzing":false}}}
escamoteur, dotdoom and mateusfccp
Metadata
Metadata
Assignees
Labels
P3A lower priority bug or feature requestA lower priority bug or feature requestarea-dart-modelFor issues related to conformance to the language spec in the parser, compilers or the CLI analyzer.For issues related to conformance to the language spec in the parser, compilers or the CLI analyzer.dart-model-analyzer-specIssues with the analyzer's implementation of the language specIssues with the analyzer's implementation of the language specos-windowstype-bugIncorrect behavior (everything from a crash to more subtle misbehavior)Incorrect behavior (everything from a crash to more subtle misbehavior)