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

Regression in 2.12.0-RC1 (scala.reflect.internal.Types$TypeError: type mismatch;) #9918

Closed
scabug opened this issue Sep 9, 2016 · 3 comments

Comments

Projects
None yet
2 participants
@scabug
Copy link

commented Sep 9, 2016

xuwei-k/scalikejdbc@7420b9f
https://travis-ci.org/xuwei-k/scalikejdbc/jobs/158631250#L674

compile success in 2.11.8 and 2.12.0-M5 https://travis-ci.org/xuwei-k/scalikejdbc/builds/158631249

git clone git@github.com:xuwei-k/scalikejdbc.git
cd scalikejdbc
git checkout Scala-2.12.0-RC1
sbt ++2.12.0-RC1 "project root211" test:compile
scala.reflect.internal.Types$TypeError: type mismatch;
 found   : scalikejdbc.package.SQLSyntaxSupport.type
 required: SQLSyntaxSupportFeature.this.SQLSyntaxSupport.type
	at scala.tools.nsc.typechecker.Contexts$ThrowingReporter.handleError(Contexts.scala:1374)
	at scala.tools.nsc.typechecker.Contexts$ContextReporter.issue(Contexts.scala:1226)
	at scala.tools.nsc.typechecker.Contexts$Context.issue(Contexts.scala:575)
	at scala.tools.nsc.typechecker.ContextErrors$ErrorUtils$.issueTypeError(ContextErrors.scala:106)
	at scala.tools.nsc.typechecker.ContextErrors$ErrorUtils$.issueNormalTypeError(ContextErrors.scala:99)
	at scala.tools.nsc.typechecker.ContextErrors$TyperContextErrors$TyperErrorGen$.AdaptTypeError(ContextErrors.scala:219)
	at scala.tools.nsc.typechecker.Typers$Typer.adaptMismatchedSkolems$1(Typers.scala:1044)
	at scala.tools.nsc.typechecker.Typers$Typer.lastTry$1(Typers.scala:1055)
	at scala.tools.nsc.typechecker.Typers$Typer.adaptExprNotFunMode$1(Typers.scala:1105)
	at scala.tools.nsc.typechecker.Typers$Typer.vanillaAdapt$1(Typers.scala:1151)
	at scala.tools.nsc.typechecker.Typers$Typer.adapt(Typers.scala:1195)
	at scala.tools.nsc.typechecker.Typers$Typer.runTyper$1(Typers.scala:5514)
	at scala.tools.nsc.typechecker.Typers$Typer.typedInternal(Typers.scala:5530)
	at scala.tools.nsc.typechecker.Typers$Typer.body$2(Typers.scala:5474)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5478)
	at scala.tools.nsc.typechecker.Typers$Typer.typedBlock(Typers.scala:2440)
	at scala.tools.nsc.typechecker.Typers$Typer.$anonfun$typed1$91(Typers.scala:5422)
	at scala.tools.nsc.typechecker.Typers$Typer$$Lambda$437/28978257.apply(Unknown Source)
	at scala.tools.nsc.typechecker.Typers$Typer.$anonfun$typerWithLocalContext$1(Typers.scala:490)
	at scala.tools.nsc.typechecker.Typers$Typer.typedOutsidePatternMode$1(Typers.scala:490)
	at scala.tools.nsc.typechecker.Typers$Typer.typedInAnyMode$1(Typers.scala:5457)
	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5464)
	at scala.tools.nsc.typechecker.Typers$Typer.runTyper$1(Typers.scala:5500)
	at scala.tools.nsc.typechecker.Typers$Typer.typedInternal(Typers.scala:5530)
	at scala.tools.nsc.typechecker.Typers$Typer.body$2(Typers.scala:5474)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5478)
	at scala.tools.nsc.typechecker.Typers$Typer.transformedOrTyped(Typers.scala:5709)
	at scala.tools.nsc.typechecker.Typers$Typer.typedDefDef(Typers.scala:2270)
	at scala.tools.nsc.typechecker.Typers$Typer.typedMemberDef$1(Typers.scala:5412)
	at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:5463)
	at scala.tools.nsc.typechecker.Typers$Typer.runTyper$1(Typers.scala:5500)
	at scala.tools.nsc.typechecker.Typers$Typer.typedInternal(Typers.scala:5530)
	at scala.tools.nsc.typechecker.Typers$Typer.body$2(Typers.scala:5474)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5478)
	at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:5555)
	at scala.tools.nsc.typechecker.Typers$Typer.typedPos(Typers.scala:5562)
	at scala.tools.nsc.transform.Fields$FieldsTransformer.typedPos(Fields.scala:511)
	at scala.tools.nsc.transform.Fields$FieldsTransformer.mkAccessor(Fields.scala:517)
	at scala.tools.nsc.transform.Fields$FieldsTransformer.$anonfun$fieldsAndAccessors$4(Fields.scala:640)
	at scala.tools.nsc.transform.Fields$FieldsTransformer.$anonfun$fieldsAndAccessors$3(Fields.scala:640)
	at scala.tools.nsc.transform.Fields$FieldsTransformer.fieldsAndAccessors(Fields.scala:639)
	at scala.tools.nsc.transform.Fields$FieldsTransformer.$anonfun$transformStats$1(Fields.scala:725)
	at scala.tools.nsc.transform.Fields$FieldsTransformer.transformStats(Fields.scala:725)
	at scala.tools.nsc.transform.Fields$FieldsTransformer.transformStats(Fields.scala:510)
	at scala.reflect.internal.Trees.$anonfun$itransform$7(Trees.scala:1430)
	at scala.reflect.internal.Trees$$Lambda$1197/1751127265.apply(Unknown Source)
	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:30)
	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:25)
	at scala.reflect.internal.Trees.itransform(Trees.scala:1430)
	at scala.reflect.internal.SymbolTable.itransform(SymbolTable.scala:16)
	at scala.reflect.api.Trees$Transformer.transform(Trees.scala:2555)
	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.super$transform(TypingTransformers.scala:40)
	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.$anonfun$transform$2(TypingTransformers.scala:42)
	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer$$Lambda$1196/43449557.apply(Unknown Source)
	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.atOwner(TypingTransformers.scala:30)
	at scala.tools.nsc.transform.TypingTransformers$TypingTransformer.transform(TypingTransformers.scala:25)
	at scala.tools.nsc.transform.Fields$FieldsTransformer.transform(Fields.scala:710)
	at scala.tools.nsc.transform.Fields$FieldsTransformer.transform(Fields.scala:510)
	at scala.tools.nsc.ast.Trees$Transformer.transformUnit(Trees.scala:140)
	at scala.tools.nsc.transform.Transform$Phase.apply(Transform.scala:30)
	at scala.tools.nsc.Global$GlobalPhase.$anonfun$applyPhase$1(Global.scala:402)
	at scala.tools.nsc.Global$GlobalPhase.applyPhase(Global.scala:395)
	at scala.tools.nsc.Global$GlobalPhase.$anonfun$run$1(Global.scala:366)
	at scala.tools.nsc.Global$GlobalPhase.$anonfun$run$1$adapted(Global.scala:366)
	at scala.tools.nsc.Global$GlobalPhase$$Lambda$277/1199869106.apply(Unknown Source)
	at scala.collection.Iterator.foreach(Iterator.scala:932)
	at scala.tools.nsc.Global$GlobalPhase.run(Global.scala:366)
	at scala.tools.nsc.Global$Run.compileUnitsInternal(Global.scala:1404)
	at scala.tools.nsc.Global$Run.compileUnits(Global.scala:1389)
	at scala.tools.nsc.Global$Run.compileSources(Global.scala:1384)
	at scala.tools.nsc.Global$Run.compile(Global.scala:1478)
	at xsbt.CachedCompiler0.run(CompilerInterface.scala:116)
	at xsbt.CachedCompiler0.run(CompilerInterface.scala:95)
	at xsbt.CompilerInterface.run(CompilerInterface.scala:26)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:483)
	at sbt.compiler.AnalyzingCompiler.call(AnalyzingCompiler.scala:101)
	at sbt.compiler.AnalyzingCompiler.compile(AnalyzingCompiler.scala:47)
	at sbt.compiler.AnalyzingCompiler.compile(AnalyzingCompiler.scala:41)
	at sbt.compiler.MixedAnalyzingCompiler$$anonfun$compileScala$1$1.apply$mcV$sp(MixedAnalyzingCompiler.scala:50)
	at sbt.compiler.MixedAnalyzingCompiler$$anonfun$compileScala$1$1.apply(MixedAnalyzingCompiler.scala:50)
	at sbt.compiler.MixedAnalyzingCompiler$$anonfun$compileScala$1$1.apply(MixedAnalyzingCompiler.scala:50)
	at sbt.compiler.MixedAnalyzingCompiler.timed(MixedAnalyzingCompiler.scala:74)
	at sbt.compiler.MixedAnalyzingCompiler.compileScala$1(MixedAnalyzingCompiler.scala:49)
	at sbt.compiler.MixedAnalyzingCompiler.compile(MixedAnalyzingCompiler.scala:64)
	at sbt.compiler.IC$$anonfun$compileInternal$1.apply(IncrementalCompiler.scala:160)
	at sbt.compiler.IC$$anonfun$compileInternal$1.apply(IncrementalCompiler.scala:160)
	at sbt.inc.IncrementalCompile$$anonfun$doCompile$1.apply(Compile.scala:66)
	at sbt.inc.IncrementalCompile$$anonfun$doCompile$1.apply(Compile.scala:64)
	at sbt.inc.IncrementalCommon.cycle(IncrementalCommon.scala:32)
	at sbt.inc.Incremental$$anonfun$1.apply(Incremental.scala:68)
	at sbt.inc.Incremental$$anonfun$1.apply(Incremental.scala:67)
	at sbt.inc.Incremental$.manageClassfiles(Incremental.scala:95)
	at sbt.inc.Incremental$.compile(Incremental.scala:67)
	at sbt.inc.IncrementalCompile$.apply(Compile.scala:54)
	at sbt.compiler.IC$.compileInternal(IncrementalCompiler.scala:160)
	at sbt.compiler.IC$.incrementalCompile(IncrementalCompiler.scala:138)
	at sbt.Compiler$.compile(Compiler.scala:152)
	at sbt.Compiler$.compile(Compiler.scala:138)
	at sbt.Defaults$.sbt$Defaults$$compileIncrementalTaskImpl(Defaults.scala:860)
	at sbt.Defaults$$anonfun$compileIncrementalTask$1.apply(Defaults.scala:851)
	at sbt.Defaults$$anonfun$compileIncrementalTask$1.apply(Defaults.scala:849)
	at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
	at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:40)
	at sbt.std.Transform$$anon$4.work(System.scala:63)
	at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:228)
	at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:228)
	at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17)
	at sbt.Execute.work(Execute.scala:237)
	at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:228)
	at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:228)
	at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:159)
	at sbt.CompletionService$$anon$2.call(CompletionService.scala:28)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
[error] (syntax-support-macro/test:compileIncremental) scala.reflect.internal.Types$TypeError: type mismatch;
[error]  found   : scalikejdbc.package.SQLSyntaxSupport.type
[error]  required: SQLSyntaxSupportFeature.this.SQLSyntaxSupport.type
@scabug

This comment has been minimized.

Copy link
Author

commented Sep 9, 2016

Imported From: https://issues.scala-lang.org/browse/SI-9918?orig=1
Reporter: kenji yoshida
Affected Versions: 2.12.0-RC1

@scabug

This comment has been minimized.

Copy link
Author

commented Sep 9, 2016

@adriaanm said (edited on Sep 9, 2016 2:54:11 PM UTC):
pkg/package.scala:

package object pkg extends T

pkg/T.scala

package pkg

trait T { object O }
@scabug

This comment has been minimized.

Copy link
Author

commented Sep 10, 2016

@scabug scabug closed this Sep 14, 2016

@scabug scabug added this to the 2.12.0-RC2 milestone Apr 7, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.