-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Inlined try block breaks pickling tests #4006
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
Labels
Comments
I would classify pickling errors in |
nicolasstucki
added a commit
to dotty-staging/dotty
that referenced
this issue
Feb 19, 2018
nicolasstucki
added a commit
to dotty-staging/dotty
that referenced
this issue
Feb 20, 2018
nicolasstucki
added a commit
to dotty-staging/dotty
that referenced
this issue
Feb 20, 2018
Decompiling the class shows that the inlined call to 62: TRY(4)
64: SHAREDterm 38
66: SHAREDterm 42 ================================================================================
./Foo.class
--------------------------------------------------------------------------------
package <empty> {
class Foo() extends Object() {
@(try
{
1
}
finally println("Hello")) inline def foo: Int =
try
{
1
}
finally println("Hello")
/* inlined from Foo*/
{
try
{
1
}
catch
{
case println => "Hello"
}
}
}
}
--------------------------------------------------------------------------------
Names:
0: ASTs
1: <empty>
2: Foo
3: <init>
4: java
5: lang
6: java[Qualified . lang]
7: Object
8: java[Qualified . lang][Qualified . Object]
9: <init>[Signed Signature(List(),java.lang.Object)]
10: Unit
11: scala
12: foo
13: Int
14: println
15: scala[Qualified . Unit]
16: println[Signed Signature(List(java.lang.Object),scala.Unit)]
17: Predef
18: Hello
19: SourceFile
20: annotation
21: scala[Qualified . annotation]
22: internal
23: scala[Qualified . annotation][Qualified . internal]
24: scala[Qualified . annotation][Qualified . internal][Qualified . SourceFile]
25: String
26: java[Qualified . lang][Qualified . String]
27: <init>[Signed Signature(List(java.lang.String),scala.annotation.internal.SourceFile)]
28: Foo.scala
29: Positions
Trees:
start = Addr(0), base = 227, current = Addr(0), end = Addr(83)
83 bytes of AST, base = Addr(0)
0: PACKAGE(81)
2: TERMREFpkg 1 [<empty>]
4: TYPEDEF(77) 2 [Foo]
7: TEMPLATE(59)
9: APPLY(7)
11: SELECT 9 [<init>[Signed Signature(List(),java.lang.Object)]]
13: NEW
14: TYPEREF 7 [Object]
16: TERMREFpkg 6 [java[Qualified . lang]]
18: DEFDEF(7) 3 [<init>]
21: PARAMS(0)
23: TYPEREF 10 [Unit]
25: TERMREFpkg 11 [scala]
27: DEFDEF(24) 12 [foo]
30: IDENTtpt 13 [Int]
32: TYPEREF 13 [Int]
34: TERMREFpkg 11 [scala]
36: TRY(14)
38: BLOCK(2)
40: INTconst 1
42: APPLY(8)
44: TERMREF 16 [println[Signed Signature(List(java.lang.Object),scala.Unit)]]
46: TERMREF 17 [Predef]
48: SHAREDtype 25
50: STRINGconst 18 [Hello]
52: INLINE
53: INLINED(13)
55: IDENTtpt 2 [Foo]
57: TYPEREFsymbol 4
59: THIS
60: TYPEREFpkg 1 [<empty>]
62: TRY(4)
64: SHAREDterm 38
66: SHAREDterm 42
68: ANNOTATION(13)
70: TYPEREF 19 [SourceFile]
72: TERMREFpkg 23 [scala[Qualified . annotation][Qualified . internal]]
74: APPLY(7)
76: SELECT 27 [<init>[Signed Signature(List(java.lang.String),scala.annotation.internal.SourceFile)]]
78: NEW
79: SHAREDtype 70
81: STRINGconst 28 [Foo.scala]
83: 50 position bytes:
0: 0 .. 78
4: 0 .. 78
7: 14 .. 76
13: 6 .. 9
14: 6 .. 6
18: 14 .. 14
23: 14 .. 14
27: 14 .. 70
30: 30 .. 33
36: 36 .. 70
38: 40 .. 45
40: 42 .. 43
42: 54 .. 70
44: 54 .. 61
50: 62 .. 69
55: 73 .. 76
62: 73 .. 76
-------------------------------------------------------------------------------- |
nicolasstucki
added a commit
to dotty-staging/dotty
that referenced
this issue
Feb 20, 2018
nicolasstucki
added a commit
to dotty-staging/dotty
that referenced
this issue
Feb 20, 2018
nicolasstucki
added a commit
to dotty-staging/dotty
that referenced
this issue
Feb 20, 2018
nicolasstucki
added a commit
to dotty-staging/dotty
that referenced
this issue
Feb 20, 2018
Add TRYfinally tag
nicolasstucki
added a commit
that referenced
this issue
Feb 22, 2018
Fix #4006: Avoid ambiguity between SHAREDterm cases and finally
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The text was updated successfully, but these errors were encountered: