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

//test:test_PosTests/testdata/rewriter/struct_prism #378

Closed
Tracked by #370
egiurleo opened this issue Dec 18, 2024 · 1 comment · Fixed by #397
Closed
Tracked by #370

//test:test_PosTests/testdata/rewriter/struct_prism #378

egiurleo opened this issue Dec 18, 2024 · 1 comment · Fixed by #397

Comments

@egiurleo
Copy link

No description provided.

@egiurleo
Copy link
Author

This is due to some differences in the symbol table. Will save until later:


test/helpers/expectations.cc:209: ERROR: Mismatch on: test/testdata/rewriter/struct.rb.symbol-table-raw.exp

If these changes are expected, run this script and commit the results:
tools/scripts/update_testdata_exp.sh

@@ -39,11 +39,11 @@
     method <S <C <U AccidentallyStruct>> $1>#<U <static-init>> (<blk>) @ Loc {file=test/testdata/rewriter/struct.rb start=37:1 end=43:4}
       argument <blk><block> @ Loc {file=test/testdata/rewriter/struct.rb start=??? end=???}
   class <C <U BadUsages>> < <C <U Object>> () @ Loc {file=test/testdata/rewriter/struct.rb start=78:1 end=78:16}
-    static-field <C <U BadUsages>>::<C <U A>> -> AppliedType {       klass = <C <U Struct>>       targs = [         <C <U Elem>> = T.untyped       ]     } @ Loc {file=test/testdata/rewriter/struct.rb start=79:3 end=79:4}
-    static-field <C <U BadUsages>>::<C <U B>> -> AppliedType {       klass = <C <U Struct>>       targs = [         <C <U Elem>> = T.untyped       ]     } @ Loc {file=test/testdata/rewriter/struct.rb start=80:3 end=80:4}
-    static-field <C <U BadUsages>>::<C <U C>> -> AppliedType {       klass = <C <U Struct>>       targs = [         <C <U Elem>> = T.untyped       ]     } @ Loc {file=test/testdata/rewriter/struct.rb start=82:3 end=82:4}
-    static-field <C <U BadUsages>>::<C <U D>> -> AppliedType {       klass = <C <U Struct>>       targs = [         <C <U Elem>> = T.untyped       ]     } @ Loc {file=test/testdata/rewriter/struct.rb start=84:3 end=84:4}
-    static-field <C <U BadUsages>>::<C <U E>> -> AppliedType {       klass = <C <U Struct>>       targs = [         <C <U Elem>> = T.untyped       ]     } @ Loc {file=test/testdata/rewriter/struct.rb start=85:3 end=85:4}
+    static-field <C <U BadUsages>>::<C <U A>> -> AppliedType {       klass = <C <U Struct>>       targs = [         <C <U Elem>> = T.untyped       ]     } @ Loc {file=test/testdata/rewriter/struct.rb start=79:3 end=79:17}
+    static-field <C <U BadUsages>>::<C <U B>> -> AppliedType {       klass = <C <U Struct>>       targs = [         <C <U Elem>> = T.untyped       ]     } @ Loc {file=test/testdata/rewriter/struct.rb start=80:3 end=80:30}
+    static-field <C <U BadUsages>>::<C <U C>> -> AppliedType {       klass = <C <U Struct>>       targs = [         <C <U Elem>> = T.untyped       ]     } @ Loc {file=test/testdata/rewriter/struct.rb start=82:3 end=82:37}
+    static-field <C <U BadUsages>>::<C <U D>> -> AppliedType {       klass = <C <U Struct>>       targs = [         <C <U Elem>> = T.untyped       ]     } @ Loc {file=test/testdata/rewriter/struct.rb start=84:3 end=84:38}
+    static-field <C <U BadUsages>>::<C <U E>> -> AppliedType {       klass = <C <U Struct>>       targs = [         <C <U Elem>> = T.untyped       ]     } @ Loc {file=test/testdata/rewriter/struct.rb start=85:3 end=85:42}
   class <S <C <U BadUsages>> $1>[<C <U <AttachedClass>>>] < <S <C <U Object>> $1> () @ Loc {file=test/testdata/rewriter/struct.rb start=78:1 end=78:16}
     type-member(+) <S <C <U BadUsages>> $1>::<C <U <AttachedClass>>> -> LambdaParam(<S <C <U BadUsages>> $1>::<C <U <AttachedClass>>>, lower=T.noreturn, upper=BadUsages) @ Loc {file=test/testdata/rewriter/struct.rb start=78:1 end=78:16}
     method <S <C <U BadUsages>> $1>#<U <static-init>> (<blk>) @ Loc {file=test/testdata/rewriter/struct.rb start=78:1 end=86:4}
@@ -78,7 +78,7 @@
       type-member(+) <C <U FullyQualifiedStructUsages>>::<S <C <U Bar>> $1>::<C <U <AttachedClass>>> -> LambdaParam(<C <U FullyQualifiedStructUsages>>::<S <C <U Bar>> $1>::<C <U <AttachedClass>>>, lower=T.noreturn, upper=AppliedType {   klass = <C <U FullyQualifiedStructUsages>>::<C <U Bar>>   targs = [     <C <U Elem>> = T.untyped   ] }) @ Loc {file=test/testdata/rewriter/struct.rb start=115:3 end=115:25}
       method <C <U FullyQualifiedStructUsages>>::<S <C <U Bar>> $1>#<U <static-init>> (<blk>) @ Loc {file=test/testdata/rewriter/struct.rb start=115:3 end=115:25}
         argument <blk><block> @ Loc {file=test/testdata/rewriter/struct.rb start=??? end=???}
-    static-field <C <U FullyQualifiedStructUsages>>::<C <U Baz>> -> Foo::Struct @ Loc {file=test/testdata/rewriter/struct.rb start=116:3 end=116:6}
+    static-field <C <U FullyQualifiedStructUsages>>::<C <U Baz>> -> Foo::Struct @ Loc {file=test/testdata/rewriter/struct.rb start=116:3 end=116:26}
     class <C <U FullyQualifiedStructUsages>>::<C <U <C <U Foo>> $1>> < <C <U Struct>> () @ Loc {file=test/testdata/rewriter/struct.rb start=114:3 end=114:23}
       type-member(=) <C <U FullyQualifiedStructUsages>>::<C <U <C <U Foo>> $1>>::<C <U Elem>> -> LambdaParam(<C <U FullyQualifiedStructUsages>>::<C <U <C <U Foo>> $1>>::<C <U Elem>>, fixed=T.untyped) @ Loc {file=test/testdata/rewriter/struct.rb start=114:3 end=114:23}
       method <C <U FullyQualifiedStructUsages>>::<C <U <C <U Foo>> $1>>#<U a> (<blk>) -> T.untyped @ Loc {file=test/testdata/rewriter/struct.rb start=114:21 end=114:22}
@@ -203,7 +203,7 @@
     method <S <C <U MixinStruct>> $1>#<U <static-init>> (<blk>) @ Loc {file=test/testdata/rewriter/struct.rb start=49:1 end=76:4}
       argument <blk><block> @ Loc {file=test/testdata/rewriter/struct.rb start=??? end=???}
   class <C <U NotStruct>> < <C <U Object>> () @ Loc {file=test/testdata/rewriter/struct.rb start=9:1 end=9:16}
-    static-field <C <U NotStruct>>::<C <U B>> -> Foo::Struct @ Loc {file=test/testdata/rewriter/struct.rb start=10:5 end=10:6}
+    static-field <C <U NotStruct>>::<C <U B>> -> Foo::Struct @ Loc {file=test/testdata/rewriter/struct.rb start=10:5 end=10:44}
   class <S <C <U NotStruct>> $1>[<C <U <AttachedClass>>>] < <S <C <U Object>> $1> () @ Loc {file=test/testdata/rewriter/struct.rb start=9:1 end=9:16}
     type-member(+) <S <C <U NotStruct>> $1>::<C <U <AttachedClass>>> -> LambdaParam(<S <C <U NotStruct>> $1>::<C <U <AttachedClass>>>, lower=T.noreturn, upper=NotStruct) @ Loc {file=test/testdata/rewriter/struct.rb start=9:1 end=9:16}
     method <S <C <U NotStruct>> $1>#<U <static-init>> (<blk>) @ Loc {file=test/testdata/rewriter/struct.rb start=9:1 end=12:4}
@@ -282,9 +282,9 @@
       type-member(+) <C <U RealStructDesugar>>::<S <C <U A>> $1>::<C <U <AttachedClass>>> -> LambdaParam(<C <U RealStructDesugar>>::<S <C <U A>> $1>::<C <U <AttachedClass>>>, lower=T.noreturn, upper=AppliedType {   klass = <C <U RealStructDesugar>>::<C <U A>>   targs = [     <C <U Elem>> = T.untyped   ] }) @ Loc {file=test/testdata/rewriter/struct.rb start=19:5 end=19:21}
       method <C <U RealStructDesugar>>::<S <C <U A>> $1>#<U <static-init>> (<blk>) @ Loc {file=test/testdata/rewriter/struct.rb start=19:5 end=29:8}
         argument <blk><block> @ Loc {file=test/testdata/rewriter/struct.rb start=??? end=???}
-      method <C <U RealStructDesugar>>::<S <C <U A>> $1>#<U new> (foo, bar, <blk>) -> AppliedType {         klass = <C <U RealStructDesugar>>::<C <U A>>         targs = [           <C <U Elem>> = T.untyped         ]       } @ Loc {file=test/testdata/rewriter/struct.rb start=26:9 end=26:39}
-        argument foo<optional> -> BasicObject @ Loc {file=test/testdata/rewriter/struct.rb start=25:21 end=25:24}
-        argument bar<optional> -> BasicObject @ Loc {file=test/testdata/rewriter/struct.rb start=25:39 end=25:42}
+      method <C <U RealStructDesugar>>::<S <C <U A>> $1>#<U new> (foo:, bar:, <blk>) -> AppliedType {         klass = <C <U RealStructDesugar>>::<C <U A>>         targs = [           <C <U Elem>> = T.untyped         ]       } @ Loc {file=test/testdata/rewriter/struct.rb start=26:9 end=26:39}
+        argument foo:<optional> -> BasicObject @ Loc {file=test/testdata/rewriter/struct.rb start=25:21 end=25:25}
+        argument bar:<optional> -> BasicObject @ Loc {file=test/testdata/rewriter/struct.rb start=25:39 end=25:43}
         argument <blk><block> -> T.untyped @ Loc {file=test/testdata/rewriter/struct.rb start=??? end=???}
   class <S <C <U RealStructDesugar>> $1>[<C <U <AttachedClass>>>] < <S <C <U Object>> $1> () @ Loc {file=test/testdata/rewriter/struct.rb start=18:1 end=18:24}
     type-member(+) <S <C <U RealStructDesugar>> $1>::<C <U <AttachedClass>>> -> LambdaParam(<S <C <U RealStructDesugar>> $1>::<C <U <AttachedClass>>>, lower=T.noreturn, upper=RealStructDesugar) @ Loc {file=test/testdata/rewriter/struct.rb start=18:1 end=18:24}


test/pipeline_test_runner.cc:174: MESSAGE: rewrite-tree OK

test/pipeline_test_runner.cc:174: MESSAGE: rewrite-tree OK

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant