From d22f8db792abab0bb3ebeb57d8ca281192f52751 Mon Sep 17 00:00:00 2001 From: Nicolas Stucki Date: Fri, 26 May 2023 10:22:37 +0200 Subject: [PATCH] Remove dead code from ClassfileParser [Cherry-picked be8d626e123d4bb3dd22cc1a55adcbc11baa9084] --- .../src/dotty/tools/dotc/core/classfile/ClassfileParser.scala | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/compiler/src/dotty/tools/dotc/core/classfile/ClassfileParser.scala b/compiler/src/dotty/tools/dotc/core/classfile/ClassfileParser.scala index 0c701eb03d38..71e00f985584 100644 --- a/compiler/src/dotty/tools/dotc/core/classfile/ClassfileParser.scala +++ b/compiler/src/dotty/tools/dotc/core/classfile/ClassfileParser.scala @@ -991,7 +991,9 @@ class ClassfileParser( return unpickleTASTY(tastyBytes) } } - else return unpickleTASTY(bytes) + else + // Before 3.0.0 we had a mode where we could embed the TASTY bytes in the classfile. This has not been supported in any stable release. + report.error(s"Found a TASTY attribute with a length different from 16 in $classfile. This is likely a bug in the compiler. Please report.", NoSourcePosition) } if scan(tpnme.ScalaATTR) && !scalaUnpickleWhitelist.contains(classRoot.name)