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

Unified Diff: mojom/mojom_parser/mojom/types.go

Issue 1423533003: Gives MojomFile a slice in order to store its imports in a specified order. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Improves comment. Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojom/mojom_parser/mojom/scopes.go ('k') | mojom/mojom_parser/parser/parse_driver.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojom/mojom_parser/mojom/types.go
diff --git a/mojom/mojom_parser/mojom/types.go b/mojom/mojom_parser/mojom/types.go
index 5eaede03030952cbd13d22d3d2fada30993ece7e..264aa498ef8778e61451a15092f1b7ddcc569f3f 100644
--- a/mojom/mojom_parser/mojom/types.go
+++ b/mojom/mojom_parser/mojom/types.go
@@ -580,7 +580,7 @@ func (ref *UserTypeRef) validateAfterResolution() error {
if ref.variableAssignment != nil && !ref.resolvedType.IsAssignmentCompatibleWith(ref.variableAssignment.assignedValue) {
fileName := "unknown file"
if ref.scope != nil && ref.scope.file != nil {
- fileName = ref.scope.file.FileName
+ fileName = ref.scope.file.CanonicalFileName
}
return fmt.Errorf("Type validation error\n"+
"%s:%s: Illegal assignment: %s %s of type %s may not be assigned the value %v of type %s.",
@@ -610,7 +610,7 @@ func (t *UserTypeRef) String() string {
func (t *UserTypeRef) LongString() string {
return fmt.Sprintf("%s %s:%s. (In %s.)", t.identifier,
- t.scope.file.FileName, t.token.ShortLocationString(), t.scope)
+ t.scope.file.CanonicalFileName, t.token.ShortLocationString(), t.scope)
}
/////////////////////////////////////////////////////////////
@@ -702,7 +702,7 @@ func (v *UserValueRef) String() string {
func (v *UserValueRef) LongString() string {
return fmt.Sprintf("%s %s:%s. (In %s.)", v.identifier,
- v.scope.file.FileName, v.token.ShortLocationString(), v.scope)
+ v.scope.file.CanonicalFileName, v.token.ShortLocationString(), v.scope)
}
func NewUserValueRef(assigneeType TypeRef, identifier string, scope *Scope,
« no previous file with comments | « mojom/mojom_parser/mojom/scopes.go ('k') | mojom/mojom_parser/parser/parse_driver.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698